I don't want to use the JOptionPane.showInputDiag method to input a username. How else can I do this from within my main class ? I have tried inner class without any success
How else do you want to do this? Is this a GUI application? Would you prefer getting the username from the console? Can you be more specific with your question?
jonas okwara
Ranch Hand
Joined: Jun 22, 2004
Posts: 58
posted
0
To be explicit, I am doing a GUI application with a "start" button among others. Once the "start" button is clicked, another gui jumps out and asks for a username and subject. I have done this with a JOptionPane method but wish I could be more expressive with another frame. however this has proved to be difficult.
The easiest thing to do is create a JDialog. It's basically a JFrame that can be modal (when it's open, the other application frames are inaccessable). You can add any component to it that you want, just like a JFrame.
Take a look at the Dialog tutorial on Sun's Swing Tutorial. It will show you how to use the JDialog class.
Michael Dunn
Ranch Hand
Joined: Jun 09, 2003
Posts: 4632
posted
0
Here's something to play around with (it's rough)
jonas okwara
Ranch Hand
Joined: Jun 22, 2004
Posts: 58
posted
0
Remember to be nice to people on your way up for you might meet them on your way down
Thx
Folks
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.