This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
Hi all I have a JFrame, i create 2 toolbars and i added them on a JFrame, but when i launch the application, the program only display toobar2 if i set layout for toobar2 is : BorderLayout.NORTH, because i would like display them consecutive Here is my code:
Only one component can take up space in a layout constraint. What you need to do is create a Tool Bar JPanel that uses something like a Box layout Y_AXIS or a GridLayout, etc. Add your tool bars to that container, then add it to the frame's NORTH constraint.
You said that: "i would like to close JToolbar when i drop/drap it and click on "X" button?" Can you please elaborate this a little more? Do you mean that you want a x button on the toolbars, so that you can close it?
Tran Tuan Hung
Joined: Apr 08, 2007
No, i would like to close the toolbar when i click on the "X" in the upper right corner (not create a new button). But when i click on it then it return the default location. Sorry for my bad english. I have asked this quesion in some forum, but not get the answer. Hope here help me.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
subject: How to create 2 toolbar consecutive on a JFrame???