Big Problem With My UI Components

Hey Guys, None Of My UI Components will display at run time (Actually only Frames do). I've tried JButtons, JTextFields, and JLabel with no luck. At first I thought maybe I screwed up on the source code so I went back literally called the void setVisible(boolean) method on every component. But unfortunately it was futile. So I downloaded some sample code made my some online tutorial and it proved me right. There is nothing shown on the screen except for a empty frame.

Here Is What I Got

import javax.swing.*;

import java.awt.event.*;

publicclass FrameSimpleextends JFrameimplements MouseListener

{

JButton jb1;

JButton jb2;

JTextField jt1;

public FrameSimple(String title)

{

super(title);

setDefaultCloseOperation(EXIT_ON_CLOSE);

JPanel p =new JPanel();

jb1 =new JButton("Delete Last");

jb2 =new JButton("Clear");

jt1 =new JTextField(40);

p.add(jb1);

p.add(jb2);

p.add(jt1);

jb1.addMouseListener(this);

jb2.addMouseListener(this);

setContentPane(p);

pack();

setVisible(true);

}

publicvoid mousePressed(MouseEvent e){}

publicvoid mouseClicked(MouseEvent e){}

publicvoid mouseEntered(MouseEvent e){}

publicvoid mouseExited(MouseEvent e){}

publicvoid mouseReleased(MouseEvent e){

if (e.getSource()==jb2)

{

jt1.setText("");

}

else

{

jt1.setText(jt1.getText().substring(0,jt1.getText().length()-1));

}

}

}

And The Main Method If Its Any Helpful

import javax.swing.UIManager;

publicclass Main

{

publicstaticvoid main(String[] args)

{

try

{

UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());

}

catch (Exception e)

{

System.out.println(e);

}

FrameSimple fp =new FrameSimple("Simple");

}

}

[3966 byte] By [ErfangCa] at [2007-10-2 10:37:37]
# 1
By The way I originally had on line 24:this.getContentPane().add(p);instead of:setContentPane(p); //Which I know is pretty unconventional and wrong
ErfangCa at 2007-7-13 2:42:16 > top of Java-index,Java Essentials,New To Java...
# 2
Not that this helps you directly, but your code runs fine here, it even works. With either way of setting the content pane.
Lokoa at 2007-7-13 2:42:16 > top of Java-index,Java Essentials,New To Java...
# 3

It just kind of occured to me that maybe problem is generated by a glitch produced when I unloaded a program that messed that messed around the general look of my OS (WindowBlinds).

The Program automatically reverted back to the Class Windows appearance after I terminated it, now that I am back in Windows XP appearance things seem to be fine except the components freezes when I try to type something into the text field.

Weirrrd

ErfangCa at 2007-7-13 2:42:16 > top of Java-index,Java Essentials,New To Java...