JButton is incomplete



Hi All,

I am new to java. Though I have written codes in C, Java is still
difficult to understand. Please help me ...

I have placed a button in a gridBagLayout(1, 3). When I reduce the
size of the screen, the button is split. I do not want it to happen
this way.

I have placed the code snippet below

/* Code starts here */
JPanel p = new JPanel();
p.setLayout(new GridLayout(1,3));

p.add(new JLabel(""));
p.add(m_titleLabel);
p.add(m_refreshPan);

m_refreshPan.setLayout(new FlowLayout(FlowLayout.LEFT));
m_refreshPan.add(m_label);
m_refreshPan.add(m_button);
/* Code ends here */

--
Felix
.


Quantcast