Originally posted by Michael Raymond Jr.:
I can't change the default size of a jbutton. the button actually shows in the northern section, but takes up the entire width and i don't want it to.
I know you said you said never mind but an obvious solution is, as you say, to use FlowLayout:
//button1.setMaximumSize(new Dimension(5,5));
JPanel flowNorth = new JPanel(); // defaults to centered FlowLayout
flowNorth.add(button1); frame1.getContentPane().add(BorderLayout.NORTH,
flowNorth);
[edit: oops, no need to set button's max size]
[ August 28, 2007: Message edited by: Brian Cole ]