• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Rob Spoor
  • Devaka Cooray
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Jj Roberts
  • Al Hobbs
  • Piet Souris

ProgressBar

 
Ranch Hand
Posts: 160
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have jdk1.3.My program progressbar.java is as follows´┐Ż.

import java.awt.*;
import javax.swing.*;
class Progress extends JFrame
{
Container c;
ProgressBar pb;
JLabel label;
public Progress(int min,int max)
{
super("Forest Developement");
c=getContentPane();
c.setLayout(null);
label=new JLabel("Data transfer in progress");
pb=new ProgressBar(min,max);
label.setBounds(20,15,250,20);
c.add(label);
pb.setBounds(20,40,250,20);
c.add(pb);
pb.setOrientation(ProgressBar.HORIZONTAL_RIGHT);
pb.setDisplayLabel(true);
pb.setBarColor(new Color(0,0,128));
//pb.setValue(10);
setSize(300,150);
setVisible(true);
pb.setPostLabel("#");
}
public static void main(String str[])
{
new Progress(10,100) ;
}
}
C:\FILESORT\junk>javac progressbar.java
progressbar.java:8: cannot resolve symbol
symbol : class ProgressBar
location: class Progress
ProgressBar pb;
^
progressbar.java:16: cannot resolve symbol
symbol : class ProgressBar
location: class Progress
pb=new ProgressBar(min,max);
^
progressbar.java:21: cannot resolve symbol
symbol : variable ProgressBar
location: class Progress
pb.setOrientation(ProgressBar.HORIZONTAL_RIGHT);
^
4 errors
what to do?
 
author and iconoclast
Posts: 24203
44
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The error messages are telling you that the compiler doesn't see any class named "ProgressBar" -- and it's right, there's no such class in the Java API. There's a javax.swing.JProgressBar; perhaps that's what you're after.
 
kriti sharma
Ranch Hand
Posts: 160
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanks i got it.
[ April 18, 2004: Message edited by: kriti sharma ]
 
reply
    Bookmark Topic Watch Topic
  • New Topic