Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Java Applet - displaying lots of text?

  • 31-01-2011 2:07pm
    #1
    Closed Accounts Posts: 27,857 ✭✭✭✭


    Hey there,

    I've got a java program that I want to put online, and it displays lots of text output (after creating a bunch of objects and messing around with them). I had thought that applets were simply a case of embedding them with the <applet> tag, but alas, I have to do even more tinkering :p

    Anywho, it seems System.out.print/ln doesn't work in applets, so what's the best way to display lots of text in a similar manner? The output will be something like:
    Ace of Clubs
    2 of Hearts
    5 of Spades
    9 of Hearts
    Jack of Clubs

    Ace of Clubs
    6 of Hearts
    9 of Spades
    10 of Hearts
    King of Clubs

    Ace of Clubs
    Ace of Hearts
    2 of Spades
    8 of Hearts
    Queen of Clubs

    Pair: 1
    Two pair: 0
    ...
    etc

    I've been googling, and most of the solutions seem to be more suitable for short bits of text and graphical stuff. I just want a text output with no graphical mumbo jumbo :)

    Cheers


Comments

  • Registered Users, Registered Users 2 Posts: 211 ✭✭CrazyFish


    Use a JTextArea.


  • Registered Users, Registered Users 2 Posts: 539 ✭✭✭but43r


    Have you got your Java class extending JApplet?
    public class DemoJApplet extends JApplet
    
    

    You know that it's not just the matter of using <applet> tag to embed application in HTML document???
    You have to extend JApplet and have init() method implemented...


Advertisement