i use netbean 6.5 i can't hide the Jlabel,i have use .setVisibel(false)
here's the problem
i want to hide and show 2 or more label with 1 button,label and button in one parent (panel),for the first label is show but if i click once te button,label is hide,and twice label is show again, can you help me !!
show with classes code,thanks

Recommended Answers

All 4 Replies

How about you show us your code. Because I'm almost positive that calling setVisible on a JButton will work, so your code must be setting it to visible again after you set it to "invisible".

You should check your button iteration too. Have u made sure that it's correct?

thanks i have been sukses in invisible label

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

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.