Welcome to the Java Programming Forums

The professional, friendly Java community. 21,500 members and growing!

The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: ColorBox or song box to put on

  1. #1
    Junior Member
    Join Date
    Dec 2013
    Thanked 0 Times in 0 Posts

    Default ColorBox or song box to put on

    see if this juke box works on canvas on your friend's PC. Sheryl Crow, soak up the sun
    package helloworld;
    import java.lang.*;
    import java.awt.*;
    import java.awt.Canvas;
    import java.awt.Graphics;

    * @author Tiki808(me on the garden island forum)
    public class ColorBox extends Canvas { //start of the class
    //Sheryl Crow, soak up the sun video

    public ColorBox() //calling this class accesses the Static variables
    { //in the main method
    drawRect(100, 100, 800, 600);
    drawRect(120, 120, 600, 400);
    drawRect(140, 140, 400, 400);
    ImageIcon pic = new ImageIcon("<iframe width=\"640\" height=\"360\" src=\"//www.youtube.com/embed/KIYiGA_rIls?feature=player_embedded\" frameborder=\"0\" allowfullscreen></iframe>");
    } //end constructor

    public static void main(String[] args) { //main method or known as static variables
    try {
    system.out.println("error message!");
    } catch(java.lang.RuntimeException); {



    /* Create and display the form */
    new Runnable() {
    public void run() {
    new ColorBox().setVisible(true);
    } //end class

  2. #2
    Member Abhilash's Avatar
    Join Date
    Jun 2014
    Kolkata, West Bengal, INDIA
    My Mood
    Thanked 10 Times in 10 Posts

    Lightbulb Re: ColorBox or song box to put on

    You can format your Java Code this way so that it looks like........ well.... um... you'll know.

Similar Threads

  1. Can't find the out put
    By javab4 in forum Loops & Control Statements
    Replies: 1
    Last Post: November 4th, 2013, 05:07 PM
  2. 4 Pics 1 Song.
    By jaydac12 in forum Android Development
    Replies: 0
    Last Post: September 21st, 2013, 12:52 AM
  3. Java Song class
    By brandalicious78 in forum What's Wrong With My Code?
    Replies: 11
    Last Post: April 23rd, 2013, 10:41 AM
  4. Making an input dialog box appear after closing a combo box
    By Shenaniganizer in forum What's Wrong With My Code?
    Replies: 14
    Last Post: November 11th, 2012, 06:22 PM
  5. How to take input dynamically and display?
    By abielm_007 in forum What's Wrong With My Code?
    Replies: 1
    Last Post: September 29th, 2009, 06:51 PM