Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa Development-process progress bar in google map

Have Programming Question? Ask it here!
 
 
 


nikhil
progress bar in google map
1 Answer(s)      5 years and 9 months ago
Posted in : Development process



Advertisement
View Answers

October 14, 2008 at 4:02 PM


Hi Nikhil,


This is simple progress bar code. please implement following code,

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

public class ProgressBarDemo extends JFrame implements ActionListener {
private JProgressBar progress;
private JButton button;
private JLabel label1;
private JPanel topPanel;


public ProgressBarDemo(){
setTitle("Progress Bar Application" );
setSize(310, 130 );
setBackground( Color.gray );

topPanel = new JPanel();
topPanel.setPreferredSize( new Dimension(310, 130 ));
getContentPane().add( topPanel );

// Create a label and progress bar
label1 = new JLabel("Waiting to start tasks..." );
label1.setPreferredSize(new Dimension(280, 24 ));
topPanel.add(label1);

progress = new JProgressBar(0,20);
progress.setPreferredSize( new Dimension(300, 20));
progress.setValue( 0 );
progress.setStringPainted(true);
progress.setBounds(20, 35, 260, 20 );
topPanel.add( progress );

button = new JButton("Start");
topPanel.add( button );
button.addActionListener( this );
}

public void actionPerformed(ActionEvent event){
if( event.getSource() == button ){
button.setEnabled(false);
for( int pbar = 1; pbar < 21; pbar++ ){
// Do some sort of simulated task
DoBogusTask(pbar);

// Update the progress indicator and label
label1.setText( "Performing task " + pbar + " of 20" );
Rectangle labelRect = label1.getBounds();
labelRect.x = 0;
labelRect.y = 0;
label1.paintImmediately( labelRect );

progress.setValue(pbar);
Rectangle progressRect = progress.getBounds();
progressRect.x = 0;
progressRect.y = 0;
progress.paintImmediately(progressRect);
}
}
}

public void DoBogusTask(int pbar){
Random random = new Random(pbar);
for( int iValue = 0; iValue < random.nextFloat() * 1000; iValue++ ){
//System.out.println( "iValue=" + iValue );
}
}

public static void main( String args[] ){
// Create an instance of the test application
ProgressBarDemo pb = new ProgressBarDemo();
pb.setVisible( true );
pb.setSize(400,200);
pb.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
}
}
-------------------------------------

Thanks



Related Tutorials/Questions & Answers:
progress bar in google map - Development process
progress bar in google map   in my google map i want a progress bar... are loaded on the map.  Hi Nikhil, This is simple progress bar code...; private JPanel topPanel; public ProgressBarDemo(){ setTitle("Progress Bar
progress bar
progress bar  Hi guys, I'm doing a file upload in spring MVC technology. For file upload i did validation in client side.While uploading how to use an ajax function to show the progress bar
Advertisements
Progress Bar
Progress Bar  Hi friend, I'm interested in knowing how to progress bar in oracle forms 9i for the trigger when-button-pressed.Thankyou. Thanks and Regards, M.SHANKAR
Progress Bar - Swing AWT
Progress Bar  Hey if possible plz help me in making the following program work... i m using threads in order to make the progress bar auto increment..." is for manual updation of progress bar.. import java.awt.*; import javax.swing.
Progress Bar in Java
Progress Bar in Java       Progress Bar is a component used to show the status of the application... application. In Java Progress Bar is created using swing. The Swing Class used
about google map
about google map  how to add google map in website
about google map
about google map  how to add google map in website
Progress Bar implementation in Java Script
Progress Bar implementation in Java Script  Hi Friend, I am new to Java Script, but i want implement the progress bar in my html by reading... progress bar will show the status. I hope you under stand my issue. Please do
add google map javascript
add google map javascript  How can i add google map using javascript in my web page?   Search for the " Google Maps Javascript API" it will allow you to embed the Google Map into your web Page
ApplicationDevelopment Using Google Map
ApplicationDevelopment Using Google Map  I want application using google map please guide me how can i develop
Dojo Progress Bar
Dojo Progress Bar          In this section, you will learn about the progress bar and how to create a progress bar in dojo. Try Online: Progress Bar Progress Bar
Google Map Integration - Ajax
Google Map Integration  Hi All, I am working on a vehicle tracking system project. I have to read data from sql server database and map the vehicle position in google map. I need to use ajax as the data is updated in every
Using Progress Bar in java apps
Using Progress Bar in java apps  Please, i am writing a program... write back to another file. I would like to know how to use a progress bar to mark the progress of the task.   Hi Friend, Try the following code: import
Progress Bar in Java Swing
Progress Bar in Java Swing       In this section, you can learn how to handle progress bar in java swing. This section shows you how the progress bar starts and stops
Progress Bar in Java
Progress Bar in Java       Progress Bar is a component used to show the status of the application... application. In Java Progress Bar is created using swing. The Swing Class used
Create Progress Bar in SWT
Create Progress Bar in SWT   ... Bar. SWT allows to create a Progress bar by providing the class ProgressBar... the progress in the form of bar. The method setMinimum() sets the minimum value
JavaScript google map API example.
JavaScript google map API example.  How to Use Google Maps API in JavaScript?   Google Maps- A map is a way of representation of your route... routes, a road map shows you road, street information. In the same way google map
to make a google map point to user defined location
to make a google map point to user defined location  Hi, i wish to develop an google map,that takes the input from a form(city,area &Country... button, the form should be submitted and then the google map should display
google map with jsf - Java Server Faces Questions
google map with jsf  hi, i am using jsf with googlemap.i load the script file with googlemap .its working fine.how can i load the database values(latlong) to googlemap from jsf bean values.i want to show mutiple markers
Creating custom application download progress bar
Creating custom application download progress bar  ... will know how to create a customized application download progress bar... is raised. This download progress bar would not be displayed if the SWF
adding multiples markers to google map from a mysql database
adding multiples markers to google map from a mysql database   hello, i am trying to add markers to my googlemaps map. the latitudes and longitudes..." content="text/html; charset=utf-8"/> <title>Google Map API
adding multiples markers to google map from a mysql database
adding multiples markers to google map from a mysql database   hello, i am trying to add markers to my googlemaps map. the latitudes and longitudes...-type" content="text/html; charset=utf-8"/> <title>Google Map API V3
adding multiples markers to google map from a mysql database
adding multiples markers to google map from a mysql database   hello, i am trying to add markers to my googlemaps map. the latitudes and longitudes...-type" content="text/html; charset=utf-8"/> <title>Google Map API V3
adding multiples markers to google map from a mysql database
adding multiples markers to google map from a mysql database   hello, i am trying to add markers to my googlemaps map. the latitudes and longitudes...-type" content="text/html; charset=utf-8"/> <title>Google Map API V3
Google Map get Current Location on iphone and Android phones
Google Map get Current Location on iphone and Android phones  Hi, I am writing a simple javascript to get longitude and latitude for current location by using google API , but it works in my desktop browser but it doesn't
how to display the nearest palaces for the given latitude and longitude value in google map in android
how to display the nearest palaces for the given latitude and longitude value in google map in android  i m working in android. i need to display... in google map in android.. can any one help me
how to refresh google map using ajax by fetching lat long from database
how to refresh google map using ajax by fetching lat long from database ... the route travelled by it will be displayed on the google map by fetching the lat long from db. Now, i need to refresh the map using ajax.Pls help me how to do
map
map  using map, i want display message based on id selected [both are strings]   i do no   Hi Friend, Try the following code...) { Map map=new HashMap(); map.put("Message1","Hello
Map
Map  If I have an object implementing the Map interface in Java and I wish to iterate over every pair contained within it, what is the most efficient way of going through the map either iterator or for each loop or for loop
AJAX Progress Bar for KUpload+
AJAX Progress Bar for KUpload+      ... information about the current upload, just like pure HTML progress bar but instead of popup window it uses an inline progress bar with the AJAX technology
Dojo Progress Bar
Dojo Progress Bar      ... the progress bar and how to create a progress bar in dojo. Progress Bar : The progress bar is a GUI (Graphical User Interface) that gives dynamic feedback
Dojo Progress Bar
Dojo Progress Bar      ... the progress bar and how to create a progress bar in dojo. Progress Bar : The progress bar is a GUI (Graphical User Interface) that gives dynamic feedback
Google maps GPS tracking
Now you can pinpoint your position with the aid of Google map that is now... exactly where you are in the map. Google did this because GPS enabled phone... loaded with Google Map and GPS technology, specially the smart phone
Dynamically Servlet progress
Dynamically Servlet progress   Hi all, My question is , when am running a servlet using ajax. It returning the response after servlet processing. Is there any way to get the response from the servlet after some progress. Please
Map code
Map code  hi................ I have map of navi mumbai, where i want to see the location vashi, nerul, turbhe.... means want to zoom into this area... as we see in google maps and locate our area of interest. Can u tel me how
license for google maps - iPhone SDK
license for google maps - iPhone SDK  Do i need a license to display the locations on google map in my iPhone application
Google Search
Google Search  I have a textbox and submit button in my JSP page. On giving word in the textbox and click submit it should redirct to google search page and fetch all the results based on my input word automatically. JSP/Servlet
Map interface
Map interface  What is the Map interface
Bar graph
Bar graph  How to include a bar chart in iPhone sdk
Google Gadget Eclipse plugin
views:Google Calender, Google Talk, Google Map Allow user to customize... Google Gadget Eclipse plugin       Overview EGadget Plugin is ued to integrate any Google
genarating student weekly progress report
genarating student weekly progress report  Hi every one iam using struts frame work backend as oracle 10g . i want code for how to genarate student weekly and monthly marks . thanks in advance
bar chart
bar chart  how to create a bar chart from values of the database and the string value should be the entities of the database??plzz help..needed badly
Google AJAXSLT
Google AJAXSLT       Google AJAXSLT is a Javascript framework for performing XSLT transformations, as well as XPath queries utilizes Backbase AJAX engine - cross browser compatible Read
Bar Chart
Bar Chart  hi...... Thanks 4 ur help for the bar graph creation i have got what i wanted. But now want to ask that in that bar graph i want multiple bar on one value means I want to create a graph where on my x-axis i have
Hash Map
Hash Map  how to add the hash map objects in the list and iterate the objects
Interactive map
Interactive map  hi........ i require map to be zoom in and enlarge the area and show its detail. Can anyone tel me how can this be done using java swings .... plz help
J2me Map load error
J2me Map load error  Hi , i am making a POC to load google map in my mobile,now i m getting the address of location by its lattitude and longitude in web page , but thing is i wana to store in my net beans emulator , its showing
Map
hash map
hash map  write a program in hash map , that shows the value in asending order. but not key value. ex: key value ==== ===== k5 ashutosh k1 babita k7 debasis k2 vikas plz help me
Advertisements
 

 

 

DMCA.com