may i ask again!different question but still use netbean! i want active a tombol in a condition, i have 5 question in panel a if the 5 question is true tombol in panel b is active!how the idea,i tried use method getParent but is not succes!thanks all
and how change the path from hardisk like this to url with type string so i can't not to change that path if i use to another computer

private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton2ActionPerformed
this.soundClass = new soundClass();
        this.soundClass.setPath("D:\\Documents and Settings\\Miss. Mia\\My Documents\\blabla\\haha\\ba.wav");
        this.soundClass.initClip();
        this.soundClass.play(); 
}

thanks all!

You should add the wav file to your NetBeans project, instead of providing absolute file path, and once JAR file created this would be included as part of your application

how about question number 1,i want active a tombol in condition, i have condition in panel a,if is true tombol in panel b is active!for easy
e.g : 5 question and 1 tombol in panel a!if 5 question true(check by tombol a) tombol in panel b is active!thanks for answer relative path!

What's a tombol?

What's a tombol?

Take it as a quiz

how about question number 1,i want active a tombol in condition, i have condition in panel a,if is true tombol in panel b is active!for easy
e.g : 5 question and 1 tombol in panel a!if 5 question true(check by tombol a) tombol in panel b is active!thanks for answer relative path!

What would be good idea to do is have main panel to which you can pass a component (in your case another panel) to dynamically set&change. So at the start you pass to this main panel your panel with questions. I'm not sure if you have some sort of submit button or you just run a check on any input components (check box, radio button, drop down) for change of state, but either of them would have some sort of mechanism to say "hey all answers correct" in which case you should pass to main panel your "winner" panel

hmmm!tombol just tombol,its like enable tombol but in 1 condition!!

sory all tombol in indonesian in english is button!i'm so confuse yesterday!

JButton inherits setEnabled(boolean) method from AbstarctButton. When you initialized button set it to false . Once you reach section where you check if all question answered there you can change button state to enabled if everything is OK.
Is that what you been looking for?

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.