Still having trouble with the color showing up, I tried getContentPane().setBackground(Color.RED); as I did have to do this for other tutorials and I also tried doing the; this.getContent..... and neither work if someone finds a solution please let me know. thanks.
This video is a favorite on Ottawa
galenblake821 1 month ago
Still having trouble with the color showing up, I tried getContentPane().setBackground(Color.RED); as I did have to do this for other tutorials and I also tried doing the; this.getContent..... and neither work if someone finds a solution please let me know. thanks.
AbsoluteMathematics 2 months ago
Hey, this tutorial is wonderful but i have run into a couple problems im hoping you can help me with.
1. On the JMenuBar it says it can't convert JMenuBar to JMenu
2. All the curly brackets match up but it tells me the last one is a syntax error
I would really appreciate help with this issue
musicinsane666 4 months ago
@musicinsane666 nvm i fixed this problem now when i run it i just get a blank screen labeled colors
musicinsane666 4 months ago
i know that already!
ejmtv 11 months ago
sucks
ejmtv 11 months ago
Hi, macheads101,
My problem is:
the line:
setBackground(Color.BLUE);
in the actionPerformed method doesn't display the desired result (the backgroung is still light grey). It's interesting that if I do:
JOptionPane.showMessageDialog(null, getBackground());
I get the following:
java.awt.Color[r=0,g=0,b=255]
So, the color is OK, just I don't see it displayed. Any suggestions?
I'm kinda new on Java and I'm using Win XP SP3.
ciberiada01 1 year ago
@ciberiada01 same things here
pagerraxenz 1 year ago
@ciberiada01 same things here
pagerraxenz 1 year ago
@ciberiada01 I don't know if you are still having trouble... but what you have to use is:
this.getContentPane().setBackground(Color.GREEN); // this is will the background colour to green
I know I may be way too late but I hope this helps anyone having trouble
Whosar 7 months ago
Comment removed
ciberiada01 1 year ago
when u ran the frame, how did u make it say MacHeads on the mac menubar(on the top of the screen)?
cludRobot 1 year ago
Hi,
JMenuBar is undefined (??) in my java eclipse platform, even if I imported javax.swing and the two other ones. What do you think is the problem?
thank you!
linoush95 1 year ago
@linoush95 try typing javax.swing.JMenuBar instead of just JMenuBar.
macheads101 1 year ago
Comment removed
linoush95 1 year ago
great tutorial. Really appreciate the work you put into these
Macrosoftech 1 year ago