• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Input Display

 
jonas okwara
Ranch Hand
Posts: 58
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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

thx

jonas
 
Gregg Bolinger
GenRocket Founder
Ranch Hand
Posts: 15302
6
Chrome IntelliJ IDE Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 58
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.


thanks

newbie
 
Gregg Bolinger
GenRocket Founder
Ranch Hand
Posts: 15302
6
Chrome IntelliJ IDE Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 4632
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here's something to play around with (it's rough)

 
jonas okwara
Ranch Hand
Posts: 58
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Remember to be nice to people on your way up for you might meet them on your way down

Thx

Folks
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic