Logo 
Search:

Java Forum

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds

Graphics

  Asked By: Juana    Date: Jul 01    Category: Java    Views: 828
  

I have a JApplet with some controls and i would like to draw a
string of text on the applet when an event occurs.

Here is the pseudo for what i would like, but i dont know the
correct way to write this, the only time i have used graphics is
with awt when i call paint;

public void paint(Graphics g) {
g.drawString("ABC", 10, 40);
}

I can use

public void paint(java.awt.Graphics g) {
...
}

but this just draws a white box over all the swing controls.

Share: 

 

1 Answer Found

 
Answer #1    Answered By: Abrianna Rossi     Answered On: Jul 01

I need to make something that displays bar graphs, what is the easiest way to do
this in swing?

Would it be a case of finding the tallest vale, and draw  other bars as a
percentage of the tallest?

 
Didn't find what you were looking for? Find more on Graphics Or get search suggestion and latest updates.




Tagged: