![]() |
|
|
|
Thread Tools | Display Modes |
|
|
|
|
#1 |
|
Newbie
Join Date: Nov 2005
Posts: 4
Rep Power: 0
![]() |
Simple, yet annoying problem with Java Beans
Hi.
I am trying to make a button bean, well a set of them having arrows facing in directions (n,s,e,w). I am having great difficulty drawing the triangles which will represent the direction. I understand you use drawPolygon(i think) to do this but... In the help features of Net Beans 4.1, it says drawPolygon(int[],int[],int[]); When i go to try put this in, it totally does not like it. public LeftButtonBean() {
super();
setPreferredSize(new Dimension (50,50));
setBorder(null);
buttonColour=Color.black;
}
public void paintComponent(Graphics g)
{
super.paintComponent(g);
g.setColor(buttonColour);
g.drawPolygon();
}right i have that so far, i have left paramaters out of the draw polygon, which gives me "error, cannot find symbol method drawPolygon()". Right does anyone know how i should go about this, the help just confuses me with its representations of what the parameters needed are. Before anyone asks, i am a novice in Java programming. Please don't ask "why are you using java?" lol. Thanks in advance guys. |
|
|
|
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|