Re: Clear menu item in swing
Are you getting an error? Are the Labels/Radio Button visible to this action listener?
I'm no swing expert, but I think your action listener may need to be in the form:
Code:
private class ClearActionListener implements ActionListener{
@Override
public void actionPerformed(ActionEvent e) {
//Do clear stuff here.
}
}
....
ActionListener clearAL = new ClearActionListener();
clearBtn.addActionListener(clearAL);
Re: Clear menu item in swing
1. Learn to follow the Java coding conventions: Code Conventions for the Java Programming Language: Contents
2. To get better help sooner, post a SSCCE (Short, Self Contained, Correct (Compilable), Example) that demonstrates the problem.
Oh, and 'not working' doesn't tell us anything. It just leads to more questions, so you might as well tell us all the relevant details upfront.
db
Re: Clear menu item in swing
I kind of wish that all of the moderaters on this site were nice... That other one from the other post I made was cool, but you are just getting annoying. post something positive for once in your life.
Re: Clear menu item in swing
You can read his posts any way you wish. The way I read it, if you follow his advice, we'll be able to better understand your code and your problem and be better able to help you. Your mileage may vary. So if you're still stuck, please tell and show us more, and again if you code that you posts conforms with convention, we'll all have a much better ability to understand it. Luck.
Edit: but heck, I've suggested this to you before.
Re: Clear menu item in swing
Quote:
Originally Posted by
zhider
I kind of wish that all of the moderaters on this site were nice... That other one from the other post I made was cool, but you are just getting annoying. post something positive for once in your life.
So you think it's nicer that people leave you to unknowingly violate coding conventions and continue to write code that is difficult for other coders to read? And that it would be nicer if I didn't tell you how to get better help sooner?
Get real. Or get a paid tutor -- and pay him/her extra to be 'nice' about everything.
db