Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Drawing on an applet

 
alan ze
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a program that draws on an applet and I'm trying to change it so that it reads input and then uses the input to draw on the applet.

How can I do that? I created another class that reads input through JOptionPane(it doesn't draw anything) but I don't know how to combine or run them both on the applet
 
Campbell Ritchie
Marshal
Posts: 52664
121
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What are you drawing? Is it a shape, an image or text? I can see a couple of sections in the Java™ tutorials which might help you: 1 and 2. Look at those, and see whether they help, then come back and tell us how you are getting on.

By the way: I shall move this thread. Not sure whether it belongs better on the Applets forum or the GUI forum, but let's try GUIs first.
 
Yes, my master! Here is the tiny ad you asked for:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!