| | |
who can help me with GUI??
Please support our Java advertiser: Programming Forums - DaniWeb Sister Site
![]() |
•
•
•
•
Originally Posted by c_est_la_vie
already done the TIO one as follows:
do
{ dStr=JOptionPane.showInputDialog("Please enter "+name+"'s demand:");
d=console.nextInt();
if (d<0)
System.out.println("Demand can't be negative.");
}while(d<0);
but don't know how to transfer it into GUI style?
anyone can help me? Thx!!!!
*Voted best profile in the world*
•
•
Join Date: Apr 2004
Posts: 573
Reputation:
Solved Threads: 5
What are you trying to do exactly. Are you doing a console app with JOption pane that will write to the console or do you want it to show up on like a GUI?, both are pretty simple. If you are just writing it to console then System.out.print(); will work. If you want to print it to a GUI, you will nees a label, JLabel label = new JLabel(), then set the text of the label to the input you recieved, which I think is a method called setText, so label.setText(inputHere); and I am not sure but I think you might have to repaint.
![]() |
Similar Threads
- How do I make a GUI in C++ (C++)
- GUI development in LINUX (Window and Desktop Managers)
- Project on offer - GUI for ATi Drivers (Software Development Job Offers)
- GUI Library help (C++)
- Help with gui loop. (C)
Other Threads in the Java Forum
- Previous Thread: Class File, making directories... relative to
- Next Thread: Topological Sort using dfsOut method
| Thread Tools | Search this Thread |
account android api applet application array arrays automation bidirectional binary birt bluetooth calculator chat class classes client code columns component data database designadrawingapplicationusingjavajslider draw eclipse editor error errors event exception expand fractal game givemetehcodez graphics gui guidancer homework html ide image inheritance input integer intellij j2me java javaprojects jlabel jme jni jpanel jtextfield julia linux list loop map method methods midlethttpconnection mobile mobiledevelopmentcreatejar monitoring myaggfun netbeans newbie nullpointerexception open-source oracle print problem program programming project property recursion ria scanner screen search server set size sms smsspam sort sourcelabs splash sql sqlite static string support swing testautomation threads time tree windows






