#Gui modify
1 messages · Page 1 of 1 (latest)
By creating your custom dialogs. If you look at the source code of JOptionPane, you'll notice that it's just a JComponent with some predefined controls shown inside a JDialog.
Now I got this, but the line class solve extends JFRame implements ActionListener { doesnt work
import javax.swing.JOptionPane;
import java.awt.event.*;
import java.awt.*;
import javax.swing.*;
class solve extends JFrame implements ActionListener {
static JFrame frame;
public static void main(String[] args) {
frame = new JFrame("Test");
solve solve = new solve();
JPanel panel = new JPanel();
frame.setSize(400,400);
JButton b = new JButton("click");
b.addActionListener(solve);
frame.add(b);
frame.add(panel);
frame.show();
}
}