I have a JDialogBox which is displayed for two different actions. When i double click on a table cell this dialog box is diplayed & also when i right click on the tabl cell this dialog gets displayed.
When it gets displayed for a double click all the components of that dialog are to be made visible. But when it gets displayed for a right click, one of the component (a panel on that dialog) should not be displayed & the space occupied by that component should be used evenly by other components.
I have modified the layout. Now I am using panels on JSplitPane & setting the divider location field of the JSplitPane when the dialog box is made visible on a right click so that the panel at the bottom of the JSplitPane is not visible.
But now the problem is that: Along with the JSplitPane, I have 2 more panels on the JDialogContentPane & therefore I am using the GridBagLayout. The JSplitPane is in between of the 2 panels. Now when I change the divider location of the JSplitPane, the components on the panel which is at the top of the JSplitPane resize themselves as the layout is GridBagLayout. But their is a lot of gap between the components & it is looking wierd.
I want to adjust all these compoenents accordingly so that the applet looks proper.
Heyy Kriti I am so sorry I cannot send u the code as it is very confidential.....
Wait I'll explain it to you in a better way:
The are 3 components on the JDialog: 1) A JPanel 2) A JSplitPane - It has 2 JPanels 3) A JPanel
Now when I double click I can see the whole JDialog with all its components alligned properly... That is what i want.
Then when i right click I want the same dialog but one of the panel on the JSplitPane should not be visible. And all the other Components should get alligned properly. Now the remaining panel on the JSplitPane should accuire the whole space. That the Panel does but their is a lot of gap between these components. And this is what i want to reduce.
You still have not conformed to our Naming Policy. Specifically you need your display name to be a First Last name format. Please do so or you risk having your account closed. We would rather keep you around here.
No thanks. We have all the government we need. This tiny ad would like you to leave now:
a bit of art, as a gift, that will fit in a stocking