This week's book giveaway is in the General Computing forum. We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line! See this thread for details.
Hey, I've got a frame the is intended to be at fullscreen size - so who ever uses this program the frame is intended to maximise to meet the size of their screen. However I can't figure out how this is done?
the pc I'm on now (1.4.0_01, win98se) MAXIMIZED doesn't work if set before the frame is made visible. my home pc, 1.5.0_05, it works the other way around.
if MAXIMIZED covers your taskbar, and you don't want it to, include the GraphicsEnvironment bit.
Tim frank
Greenhorn
Joined: Mar 07, 2006
Posts: 25
posted
0
I'm using JBuilder Frame designer tool to make this program and in the code it doesnt give have a JFrame construcotr.. anywhere, So i cant change the size that way. I
n the design view the only top level components I can see are the contentPane, Jscrollpane, and Jtoolbar.
Ahh please help, this is frustrating beyond belief.
Michael Dunn
Ranch Hand
Joined: Jun 09, 2003
Posts: 4632
posted
0
One of the joys of using a gui-builder.
Perhaps worth posting in one of Borland's JBuilder forums.
Jonathan Janisch
Greenhorn
Joined: Mar 17, 2007
Posts: 24
posted
0
Timbo, I just downloaded JBuilder just to answer your question
I have never used it before. It is JBuilder 2005 Foundation.
1) I created a new project. 2) I created a new "Frame" called "MyFrame" using the javax.swing.JFrame base class. 3) I clicked the "Design" tab. 4) I added a JLabel and JButton.
It generated the following code:
Notice: MyFrame extends JFrame. Thus, when MyFrame()'s constructor is called, JFrame's default constructor is automatically called.
I added the following code to maximize the window as in my first post and it worked as expected:
You will probably have to combine this with Michael's code to get it to work for earlier JDK's. [ March 20, 2007: Message edited by: Jonathan Janisch ]
Jonathan Janisch
Greenhorn
Joined: Mar 17, 2007
Posts: 24
posted
0
If you're going to do GUI development, I strongly suggest NetBeans. It's much more straightfoward to design a GUI out of the box using NetBeans than other Java IDE's.
Tim frank
Greenhorn
Joined: Mar 07, 2006
Posts: 25
posted
0
Sorry, I'm an idiot. I was looking for the frame decloration in the wrong class... it's working fine now haha. Thanks everyone
Welcome to the JavaRanch! We don't have many rules around the ranch, but we do have a policy on displayed names... Please adjust your displayed name to meet the JavaRanch Naming Policy. User names cannot be obviously fake and must consist of a first name and a last name.