Floating JButton in the left corner

I have a huge JPanel , so it scrolls. In this JPanel , I have a JButton in the right corner. When I want to click, I always need to scroll here. Is it possible to have a floating JButton in the right corner of my application?

if yes please help me

+4
source share
2 answers

create a JWindow and put a JButton there, this container you can stick to the right corner of JViewPort

+2
source

The setDefaultButton() method can allow you to use a button without scrolling or hiding data under a floating component.

+2
source

Source: https://habr.com/ru/post/1384417/


All Articles