A friendly place for programming greenhorns!
Big Moose Saloon
Search
|
Java FAQ
|
Recent Topics
Register / Login
Win a copy of
The Mikado Method
this week in the
Agile and other Processes
forum!
JavaRanch
»
Java Forums
»
Frameworks
»
Struts
Author
Frame's setSize() method is not working !!!
Abhimanyus singh
Greenhorn
Joined: Apr 11, 2012
Posts: 22
posted
Mar 10, 2013 09:41:09
0
import java.awt.Container; import java.awt.Dimension; import javax.swing.JFrame; class MyFrame extends JFrame { MyFrame(String h) { super(h); this.setSize(200, 200); this.setResizable(false); //setLocationRelativeTo(null); Container content=this.getContentPane(); content.setLayout(null); this.setVisible(true); } } class Main1 { public static void main(String args[]) { MyFrame frame=new MyFrame("This frame"); } }
Every time I run this code, it results into a maximized frame, occupying the screen completely, I'm confused why is this happening ?? PLease help !!!
Abhimanyus singh
Greenhorn
Joined: Apr 11, 2012
Posts: 22
posted
Mar 10, 2013 09:46:22
0
Sorry Guys !!I posted it in a wrong category !!
I agree. Here's the link:
http://ej-technologies/jprofiler
- if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
subject: Frame's setSize() method is not working !!!
Similar Threads
GridBagLayout
JScrollBar, key events
Text to Image to File
When component class add method will throws an IllegalArguemnt Exception?
Getting Bitmap from Canvas and converting it into image file format
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter