hi..
can any one heLp to this prob...
here's the code:
and the other one:Quote:
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
public class JFrameWithPanel extends JFrame {
JButton button = new JButton("Exit");
public JFrameWithPanel() {
super("JFrame with Panel and Button");
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
JPanel Panel = new JPanel();
Panel.add(button);
setContentPane(Panel);
}
}
the process is all completeQuote:
import javax.swing.*;
public class JFrameWithPanelDemo {
public static void main(String[] args) {
JFrame aFrame = new JFrameWithPanel();
aFrame.setSize(350, 90);
aFrame.setVisible(true);
}
}
but every time i click the exit in
the frame.. it won't exit.. :(
PLS help me to add some codes in exit...
tnx

