Added: 1 year ago
From: macheads101
Views: 6,214
Sort by time | Sort by thread (beta)

Link to this comment:

Share to:

All Comments (18)

Sign In or Sign Up now to post a comment!
  • This video is a favorite on Ottawa

  • 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.

  • 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 nvm i fixed this problem now when i run it i just get a blank screen labeled colors

  • i know that already!

  • sucks

  • 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 same things here

  • @ciberiada01 same things here

  • @ciberiada01 I don't know if you are still having trouble... but what you have to use is:

    this.getContentPane().setBackg­round(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

  • Comment removed

  • when u ran the frame, how did u make it say MacHeads on the mac menubar(on the top of the screen)?

  • 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 try typing javax.swing.JMenuBar instead of just JMenuBar.

  • Comment removed

  • great tutorial. Really appreciate the work you put into these

Loading...
Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more