ComboBox width before setVisible??
- From: "Paulo Filipe" <paulorcfilipe@xxxxxxxxx>
- Date: 26 Sep 2006 03:45:46 -0700
HI
I'm using a comboBox and need to know his size before i set the frame
visible, i did more or less this code:
JFrame frame = new Frame();
.............
JComboBox combo = new JComboBox( {"small text","a more long text"} );
combo.setSelectedIndex(0);
............
int x = combo.getWidth(); // x is 0 here.
frame.setVisible();
int y = combo.getWidth(); // y is the size of the comboBox with the
option "a more long text"
But i want to know his width before to resize a panel.
Anyone knows how can i do it??
.
- Follow-Ups:
- Re: ComboBox width before setVisible??
- From: Thomas A. Russ
- Re: ComboBox width before setVisible??
- From: Michael Rauscher
- Re: ComboBox width before setVisible??
- Prev by Date: Re: panel size vs. frame size
- Next by Date: Re: ComboBox width before setVisible??
- Previous by thread: BoxLayout, strunt, rigidarea
- Next by thread: Re: ComboBox width before setVisible??
- Index(es):
Relevant Pages
|
|