| | |
accesing Jpanel/Jframe from a class....
Please support our Java advertiser: Programming Forums - DaniWeb Sister Site
![]() |
•
•
Join Date: Jun 2008
Posts: 46
Reputation:
Solved Threads: 1
I have two classes in here..One extends from a Jpanel , it is where I do all the paints and staffs on my screen. The other one is just a class. But in that class I want to define a draw function..say
[ public void draw(Graphics g){
g.drawImage(image,100,100,30,30,?????);
}]
Now, I want to use this draw function to draw on my Panel.
What I want to know is, is there any built in function where I can fill in the fifth argument (which takes in the image Observer) in the draw function to access my Jpanel?
Hope you get my question..THanks LOTS!
[ public void draw(Graphics g){
g.drawImage(image,100,100,30,30,?????);
}]
Now, I want to use this draw function to draw on my Panel.
What I want to know is, is there any built in function where I can fill in the fifth argument (which takes in the image Observer) in the draw function to access my Jpanel?
Hope you get my question..THanks LOTS!
![]() |
Similar Threads
- JLabel in JPanel (Java)
- another ActionListener question (Java)
- JPanel In Standalone Class (Java)
- Dynemic Image on JPanel (Java)
- need help with jbutton and new jframe (Java)
- Resizing JPanel in JPanel in JFrame (Java)
- Help with jpanel and jframe drawing java (Java)
- Homework Help (Java)
- JPanel and putting a Background GIF pic...NOT WORKING (Java)
Other Threads in the Java Forum
- Previous Thread: Static method doesn't actually return anything
- Next Thread: Help with AverageGrade Swing Program
| Thread Tools | Search this Thread |
2dgraphics android api apple applet application arguments array arrays automation banking binary binarytree bluetooth capture chat chatprogramusingobjects class classes client code color component count database derby design eclipse eclipsedevelopment encryption error event exception fractal game givemetehcodez graphics gridlayout gui html ide if_statement image input integer interface j2me java javadesktopapplications javaprojects jlabel jni jpanel julia keyword linux list loop macintosh map method methods midlethttpconnection mobile netbeans newbie object os print printing problem producer program programming project projectideas read recursion reference replaysolutions ria scanner screen server set size sms sort sourcelabs sql stop string swing threads transforms tree ui unicode validation windows





