As you can see the text in the JCombobox is to small, but I don't know why.
I also tryed jCombobox_test.setpreferedsize() and setSize() but it both doesn't work
And in another GUI of me I had this, and that is what I'm looking for:
D. Ogranos
Ranch Hand
Joined: Feb 02, 2009
Posts: 210
posted
0
You probably set a maximum size for the combo boxes somewhere. Can you post the code where you create them?
You shouldn't need to set either the preferredSize or the size. However, the layout you use and the way you set the size (or don't) of the enclosing Window/Container may influence the displayted size of a contained component.
Can't compile this, as DialogLayout is unknown (I can't find this in the API either, is this a class written by you?). Since the layout heavily influences how things are drawn, I'd suggest looking at that class
Michael Dunn
Ranch Hand
Joined: Jun 09, 2003
Posts: 4632
posted
0
the problem must be in the menu.
having read Darryl's link to the SSCCE, you obviously would not have included
the menu code if it was unrelated to the problem, ergo, it must be the problem.
Gynnad Paullussen
Ranch Hand
Joined: Jan 26, 2011
Posts: 47
posted
0
D. Ogranos wrote:Can't compile this, as DialogLayout is unknown (I can't find this in the API either, is this a class written by you?). Since the layout heavily influences how things are drawn, I'd suggest looking at that class
Hello,
Sorry, for my very very late response, but here is my small project, only with the 2 classes that are needed and a small code where you can see 1 combox!
if not:
change jPanelRight3 to a BorderLayout create a holdingPanel(new GridLayout(0,2,20,5))
add the comboBox and 3 x labels to the holdingPanel
add the holdingPanel to jPanelRight3 at BorderLayout.NORTH
Gynnad Paullussen
Ranch Hand
Joined: Jan 26, 2011
Posts: 47
posted
0
Michael Dunn wrote:are you required to use DialogLayout?
if not:
change jPanelRight3 to a BorderLayout create a holdingPanel(new GridLayout(0,2,20,5))
add the comboBox and 3 x labels to the holdingPanel
add the holdingPanel to jPanelRight3 at BorderLayout.NORTH
Thanks alot! I used the Dialoglayout only to get two rows in the panel. But I see now it can also with the Gridlayout!
You are my hero! :)
Gynnad Paullussen
Ranch Hand
Joined: Jan 26, 2011
Posts: 47
posted
0
Michael Dunn wrote:are you required to use DialogLayout?
if not:
change jPanelRight3 to a BorderLayout create a holdingPanel(new GridLayout(0,2,20,5))
add the comboBox and 3 x labels to the holdingPanel
add the holdingPanel to jPanelRight3 at BorderLayout.NORTH
I have still the problem here. And I now know what the problem is.
I have Java7, that is the problem.. Someone knows how I can fix this?
Because I distribute the program, and if some else has Java 7 whats going wrong?