Results 1 to 2 of 2
- 05-19-2011, 12:20 PM #1
Member
- Join Date
- May 2011
- Posts
- 12
- Rep Power
- 0
help making class print in jpanel
So i have this code called jpanel and I want to use it as a gathering place for all my other classes to work together in, in the game I'm making
now its pretty bare right now because I deleted all the stuff in it as it didn't work and got messy, basically the first thing I want to do right now is make my background in a class called something like "Background" then get it to be printed out in the paint component. ( don't worry about the jframe, that's already been set and is working fine along with the application file.) So how would I go about doing that?Java Code:import java.awt.*; import java.awt.event.*; import javax.swing.*; public class AJPanel extends JPanel { public A3JPanel() { setBackground(Color.white); } public void paintComponent(Graphics g){ super.paintComponent(g); } }
- 05-19-2011, 02:39 PM #2
Similar Threads
-
Help making a grid inside of a JPanel
By satanfx55 in forum AWT / SwingReplies: 3Last Post: 05-13-2011, 07:18 PM -
I would like to print this JPanel class. How?
By AcousticBruce in forum New To JavaReplies: 8Last Post: 02-26-2011, 06:25 PM -
print multiple jpanel
By anilkumar_vist in forum New To JavaReplies: 0Last Post: 02-05-2010, 03:28 PM -
print jpanel
By anilkumar_vist in forum New To JavaReplies: 3Last Post: 01-08-2010, 12:08 PM -
Making text blink in a JPanel?
By blackcloud72 in forum New To JavaReplies: 8Last Post: 10-31-2008, 11:24 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks