So basically I have this button. (rightbutton)
I want it so when you click on this button a notification/popup appears that says "Congratulations, you clicked a button." then just say "OK" and "Cancel" (both just exit out the panel, same "task" really)
I used a JOptionPane but that of course would not work because it has a big text bar which I don't want.
So I'm guessing you'd have to make a JPanel and add the JButtons "OK" and "Cancel" inside that panel? I'm stumped.
rightbutton = new JButton("Right.");
add(rightbutton);
rightbutton.addActionListener(
new ActionListener(){
public void actionPerformed(ActionEvent event){
//what do we want to happen when we
//click the button
JOptionPane.showInputDialog("Congratulations, you clicked the button.");
thanks!