1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

display command line output in a Java GUI

Discussion in 'Software' started by Just Playin, Oct 20, 2007.

  1. Just Playin

    Just Playin MajorGeek

    I have a friend taking an introductory Java class. She is having a problem and asked me for help (I have somehow become a computer expert to my friends because I can do a bit more than hit the power switch and hope nothing goes wrong). I fixed a few minor bugs but this is a bit beyond my scope. If anyone reading this could point out a good tutorial or other help, I would appreciate this. I have done many searches and looked through the textbook for something that might help, but I'm coming up blank.:confused: :cry:

    Attached Files:

    Last edited: Oct 20, 2007
  2. noahawk

    noahawk Corporal

    So she wants to display text in the GUI? There are two different ways to do it. One way is to use a JLabel for each line of text and the other is to use the drawString method. I believe drawString is mostly used in a paint method, and JLabel may be better suited to how it looks this needs to be displayed. Here is a link about drawString, and here is a place to search and find out about methods and classes available in Java. If they are not using Java 1.5, change the 1.5.0 in the last link to 1.4.2 and you'll have access to everything used in that version.

    I hope this helps in getting them started.

Share This Page

MajorGeeks.Com Menu

MajorGeeks.Com \ All In One Tweaks \ Android \ Anti-Malware \ Anti-Virus \ Appearance \ Backup \ Browsers \ CD\DVD\Blu-Ray \ Covert Ops \ Drive Utilities \ Drivers \ Graphics \ Internet Tools \ Multimedia \ Networking \ Office Tools \ NEW! PC Games \ System Tools \ Macintosh \ Demonews.Com \ Top Downloads

MajorGeeks.Com \ News (Tech) \ Off Base (Other Websites News) \ Way Off Base (Offbeat Stories and Pics)

Social: Facebook \ YouTube \ Twitter \ Tumblr \ Pintrest \ RSS Feeds