This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes swing..simple Q? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "swing..simple Q?" Watch "swing..simple Q?" New topic
Author

swing..simple Q?

kieran pattni
Ranch Hand

Joined: Jan 19, 2004
Posts: 47
hi..simply question...why doesnt look like Jframe when i run it...it just looks normal frame...
import javax.swing.*;
public class SimpleGui1
{
public static void main(String[] args)
{
JFrame frame = new JFrame();
JButton button = new JButton("Click me");

frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

frame.getContentPane().add(button);

frame.setSize(300,300);

frame.setVisible(true);
}
}
thanks in advance
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24183
    
  34

In what way are you expecting a JFrame to look different from a Frame? Being empty windows, with decorations drawn by the host windowing system, they're going to look more or less identical.


[Jess in Action][AskingGoodQuestions]
Dirk Schreckmann
Sheriff

Joined: Dec 10, 2001
Posts: 7023
Moving this to the Swing / JFC / AWT forum...


[How To Ask Good Questions] [JavaRanch FAQ Wiki] [JavaRanch Radio]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: swing..simple Q?
 
Similar Threads
Probelm with JFrame Minimization.
JButton button
open new window
JFrame one instance
From a OO Point of View in GUI design