Color Pallet in Swing

import javax.swing.*;
import java.awt.*;
import javax.swing.event.*;

public class MovingBannerColors extends JApplet implements Runnable,ChangeListener
/*<Applet code="MovingBannerColors.class" height=400 width=400>
String s;
JLabel lbl;
JColorChooser palete;
public void init()
     Container frame = getContentPane();    
        lbl = new JLabel("Welcome to My Blog -*- ");      
        frame.setLayout(new BorderLayout());
        palete=new JColorChooser();
        lbl.setFont(new Font("Helvetica", Font.BOLD, 30));
        frame.add(lbl, BorderLayout.NORTH);
        s= "Welcome to My Blog -*- ";
                public void stateChanged(ChangeEvent e)
public void start()
Thread t=new Thread(this);

public void run()
      char c=s.charAt(0);      
       catch(InterruptedException e)

No comments:

Post a Comment

Thanks for visiting my Blog!

Have a Question ? Need Help in College Assignments, Need Code that is not available here? Just leave a comment & get your code instantly.

Tips to Enhance Your Blog