Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Java GUI Toolbar [closed]

I am developing a Java Desktop Application. In that I want some toolbars at the top of the JFrame (as in usual GUI appllications).

I want to allow user to add/remove toolbars dynamically by clicking on some buttons. How can I implement this (through any Layouts or some other way) so that when a user add/removes a toolbar, the rest of the space below the toolbar is adjusted accordingly.

like image 923
Yatendra Avatar asked Apr 08 '26 15:04

Yatendra


1 Answers

I would recommend you using BorderLayout for the program and keep the North area for the toolbars. To this (North) area add another container (with BoxLayout or FlowLayout), depending on how you want your toolbars to be added/where placed in the container.

Have a look at this Java Layout Manager tutorial.

like image 103
Artur Avatar answered Apr 11 '26 04:04

Artur



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!