I tried something like this:
public static void msgbox(Graphics g)
{
g.drawOval(100,100,10,10);
}
But it gives me an error saying can not resolve symbol. Any ideas?
OK…nevermind I forgot to import the right packages that’s all…hahaha silly me
I tried something like this:
public static void msgbox(Graphics g)
{
g.drawOval(100,100,10,10);
}
But it gives me an error saying can not resolve symbol. Any ideas?
OK…nevermind I forgot to import the right packages that’s all…hahaha silly me
ok I how got another related problem.
I need to use the above method to draw and image.
g.drawImage(baa, 100, 100, 100 ,100, this);
the problem is that I can’t use the image observer “this” is there anyway to get around this?
use null instead.
Kev
Cool it works…Thanks a lot!!
Anyone know how to change the font that Jave uses for g.drawString? I tried setFontSize but it asks for a mutable attribute set and I have to idea what that is. Thanks.
java.awt.Graphics.setFont(java.awt.Font)
I’m not sure what you mean by that? could you give an example of how to change the font?
g.setFont(new Font(“Arial”,16,Font.BOLD));
hmmm. when I run the program no words appear however the program compiles fine. any ideas?
[quote]any ideas?
[/quote]
Have you tried to find out what is wrong? Can you draw other shapes at the same position? Are you sure the text color is not the same as background color? etc…etc.