GUI Disappearing when I add JComboBox
Alright I'm relatively new to programming and it may be just something
simple that I'm missing but the other threads related to this topic the
poster didn't give adequate information relative to their issue for others
to provide quality answers so I will give it a shot.
public BenchUI(JFrame j){
jf = j;
init();
add(mainPanel);
topPanelButtons();
selectedCustomer();
rentalOptions();
clientListBox();
}
At this point i can point out that everything works perfectly until I add
the clientListBox() method. (below)
public void clientListBox(){
clientList = new JComboBox(moo);
clientList.setPreferredSize(new Dimension(460,30));
gbc.gridx = 0;
gbc.gridy = 0;
leftSide.add(clientList,gbc);
}
i can comment it out and get my whole GUI back working perfectly but
without a JComboBox.
moo is String [] moo = {"Fish","Goat", "Monkey"}; a dummy string just for
testing purposes and initialized at the start.
So any idea why my GUI completely disappears when I place in the clientList?
If anything else is necessary I'll be watching this thread and can provide
additional information.
As a side note I keep getting warnings for "Raw Types" but it works
without specifiying, could I potentially run into trouble by not
specifying my JComboBox?
No comments:
Post a Comment