View Single Post
  #10 (permalink)  
Old 06-30-2008, 03:24 PM
Mir Mir is offline
Senior Member
 
Join Date: Mar 2008
Posts: 447
Mir is on a distinguished road
Quote:
Originally Posted by Niveditha View Post
Hi,
Even i have jdk1.6 installed and the following code is running perfectly in my comp.

Code:
import javax.swing.*; import java.awt.*; import java.awt.event.*; public class ProgressSample2 { public static void main(String args[]) { final JProgressBar aJProgressBar = new JProgressBar(0, 100); aJProgressBar.setIndeterminate(true); JButton aJButton = new JButton("Toggle"); ActionListener actionListener = new ActionListener() { public void actionPerformed(ActionEvent e) { boolean indeterminate = aJProgressBar.isIndeterminate(); aJProgressBar.setIndeterminate(!indeterminate); } }; aJButton.addActionListener(actionListener); JFrame theFrame = new JFrame("Indeterminate"); theFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); Container contentPane = theFrame.getContentPane(); contentPane.add(aJProgressBar, BorderLayout.NORTH); contentPane.add(aJButton, BorderLayout.SOUTH); theFrame.setSize(300, 100); theFrame.show(); } }
Sorry to say but i have same problem after run your code..
Reply With Quote