/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package progressbar;

/**
 *
 * @author DEBASISH
 */
import java.awt.*;
import javax.swing.*;
import java.awt.event.*;
import java.awt.event.ActionEvent;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
public class Progressbar {
JProgressBar jprogressbar=new JProgressBar();
JButton jbutton=new JButton("Retrieve information");
public void init(){
    Container contentPane=getContentPane();
    contentPane.setLayout(new FlowLayout());
    contentPane.add(jbutton);
    jprogressbar.setForeground(Color.green);
    contentPane.add(jprogressbar);
    jbutton.addActionListener(new ActionListener(){
    public void actionPerformed(ActionEvent e){
        jProgressbar.setValue(jprogressbar.getValue()+10);}});
        jprogressbar.addChangeListener(new ChangeListener(){
            @Override
        public void stateChanged(ChangeEvent e){
            showStatus("Progressbar minimum::" +jprogressbar.getMinimum() + "maximum:"jProgressbar.getMaximum()+"value:"+jprogressbar.getValue());}

            private void showStatus(String string) {
                throw new UnsupportedOperationException("Not yet implemented");
            }
        });

}

    private Container getContentPane() {
        throw new UnsupportedOperationException("Not yet implemented");
    }
        }    









    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        // TODO code application logic here
    }

    private Container getContentPane() {
        throw new UnsupportedOperationException("Not yet implemented");
    }
}

when i run the program it is showing an error message "Class progressbar.Prgressbar does not have a main method"...... what does it mean ??
plz help..

you need to put the main method and all your methods inside your public class

private Container getContentPane() {
throw new UnsupportedOperationException("Not yet implemented");
}
}

the last bracket here ends your public class
and don't put ); after the end brackets

*next time wrap your code in code tags so we can just point out what line you got the error

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.