Drawing on JFrame / JPanel in Netbeans

Hello All,

I'm writing a project in NetBeans 5.5, and I need to draw some graphics onto my form, or even more preferable my panels. I've drawn on stuff before in java using the .drawRect etc. method, and although this is fairly simply, I'm now using NetBeans and can't figure out how to do it! I realize that these forums are mostly for java-specific, as oposed to IDE-related questions, but I was wondering if anyone can tell me how to use these methods-or one similar to them in the NetBeans IDE (using a Jpanel or JFrame). Thanks so much! Any help is greatly appreciated.

-Robert

[605 byte] By [rlindmana] at [2007-11-27 4:08:54]
# 1
You should see the documentation of the tool you use.This is not Java programming issue.
hiwaa at 2007-7-12 9:14:17 > top of Java-index,Java Essentials,New To Java...
# 2

> Hello All,

> I'm writing a project in NetBeans 5.5, and I

> need to draw some graphics onto my form, or even

> more preferable my panels. I've drawn on stuff

> before in java using the .drawRect etc. method, and

> although this is fairly simply, I'm now using

> NetBeans and can't figure out how to do it! I

> realize that these forums are mostly for

> java-specific, as oposed to IDE-related questions,

> but I was wondering if anyone can tell me how to use

> these methods-or one similar to them in the NetBeans

> IDE (using a Jpanel or JFrame). Thanks so much! Any

> help is greatly appreciated.

> Robert

You simply write your own JPanel with the paintComponent overriden, and then you add it to the Palette from Tools > Add to Palette... so you can then drag and drop it with matisse

Ruly-o_Oa at 2007-7-12 9:14:17 > top of Java-index,Java Essentials,New To Java...