How do I set the width of a frame in Java(swing)?
You can use the set the size of a JFrame by setting the size property. Im pretty sure that the first arguement is width and the second is height. Code: JFrame jf = new JFrame(); jf.setSize(200,300);
JFrame jf = new JFrame(); jf.setSize(200,300);
Last edited by Dilenger4; Jul 9th, 2002 at 03:48 PM.
Java CodeBank Entries >> Parsing URL's| Collections/ShuffleElements | Threads isAlive() | Daemon Threads |Remote Class Loading | Sorted Keys (Map) | Backwards List | Thread States | Collections/Arrays Generics | Regular Expression(Grouping and Capturing) | Properties | JLabel/JTextField Combo | Reading Request Parameter Values | Host Lookup | Setting the size of a JFrames inner-region | GUI Native L&F
Forum Rules