How to create a JFrame like an JOptionPane
Hi,
Im developing a game. When the human gets his turn i want to display a JFrame with some buttons.
So the game must wait until the user clicks on a button. Also i want to identify which button is clicked.
I read that JOptionPna gets any component as a parameter.I did the following.
but the coding of the my object is shown inside an input field.
MyFrame my=new MyFrame();
JOptionPane.showInputDialog(null,"test",my);
PLZ....... help me
coroll
Junior Poster in Training
98 posts since Jul 2010
Reputation Points: 10
Solved Threads: 0
Skill Endorsements: 0
the game must wait until the user clicks on a button
Look at the JDialog class.
NormR1
Posting Sage
7,742 posts since Jun 2010
Reputation Points: 1,158
Solved Threads: 793
Skill Endorsements: 16