2 Replies - 1363 Views - Last Post: 21 October 2009 - 10:54 PM Rate Topic: -----

#1 lpapcke  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 12-October 09

Advancing a progress bar by checking checkboxes

Posted 21 October 2009 - 07:50 PM

Hello. My question is whether a progress bar can be progressed by the checking of check boxes as I try to indicate below. I'm barely beginning at Java and have just started a new project. I don't want to waste time trying to do what can't be done. I've already done a lot of time wasting it seems. Crying doesn't seem to help.

  static final boolean checked = true;
	private void boxChecked1(java.awt.event.ActionEvent evt) {

		if (boxChecked = true)
			//TODO CONTINUE TO CODE ADVANCE PROGRESS BAR 1/3
	}

	private void boxChecked2(java.awt.event.ActionEvent evt) {

		if (boxChecked = true)
		// TODO CONTINUE TO CODE ADVANCE PROGRESS BAR 2/3
	}

	private void boxChecked3(java.awt.event.ActionEvent evt) {

		if (boxChecked = true)
		// TODO CONTINUE TO CODE ADVANCE PROGRESS BAR TO FULL
	}

	private void callNextWindow(java.awt.event.MouseEvent evt) {
		// TODO CODE TO CLOSE CURRENT WINDOW AND OPEN NEXT WINDOW OF TUTORIAL
	}

	private void jDesktopPane1PropertyChange(java.beans.PropertyChangeEvent evt) {
		// TODO CLOSE WINDOW ON Jbutton1 MOUSE RELEASE
	}

	/**
	* @param args the command line arguments
	*/
	public static void main(String args[]) {
		java.awt.EventQueue.invokeLater(new Runnable() {
			public void run() {
				new protypeProject().setVisible(true);
			}
		});
	}

	// Variables declaration - do not modify
	private javax.swing.ButtonGroup buttonGroup1;
	private javax.swing.JButton jButton1;
	private javax.swing.JCheckBox jCheckBox1;
	private javax.swing.JCheckBox jCheckBox2;
	private javax.swing.JCheckBox jCheckBox3;
	private javax.swing.JDesktopPane jDesktopPane1;
	private javax.swing.JLayeredPane jLayeredPane1;
	private javax.swing.JProgressBar jProgressBar1;
	private java.awt.Label label1;
	private org.jdesktop.beansbinding.BindingGroup bindingGroup;



Is This A Good Question/Topic? 0
  • +

Replies To: Advancing a progress bar by checking checkboxes

#2 pbl  Icon User is offline

  • There is nothing you can't do with a JTable
  • member icon

Reputation: 8324
  • View blog
  • Posts: 31,857
  • Joined: 06-March 08

Re: Advancing a progress bar by checking checkboxes

Posted 21 October 2009 - 08:43 PM

You can reset the status of a progressBar where ever you want
you can even get its status and just increment it

Your posted code does not show your GUI at all

And better to learn how to use array[] for your CheckBox that will save you a lot of code
Was This Post Helpful? 0
  • +
  • -

#3 lpapcke  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 12-October 09

Re: Advancing a progress bar by checking checkboxes

Posted 21 October 2009 - 10:54 PM

View Postpbl, on 21 Oct, 2009 - 07:43 PM, said:

You can reset the status of a progressBar where ever you want
you can even get its status and just increment it

Your posted code does not show your GUI at all

And better to learn how to use array[] for your CheckBox that will save you a lot of code



Thank you very much for a speedy reply. Knowing I'm not going on a wild goose chase helps alot! It's hard to know what to do when you don't have any idea what can be done. The code was only to give an idea of the plan. I was going to use the drag and drop method but I'm beginning to think I'll end up less confused if I just work on coding it manually. I'll know in two weeks when the project is due. It's a 6 week class that will either kill me or make me stronger. Thanks again.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1