making visible disabled JComponents
Hello everyone,
I'm just wondering if there's a way to set a JComponent to disabled (ie. Component.setEnabled(false)) without having its appearance greyed out. That is - conserve it's look & feel such that the user would not be able to tell it was disabled unless she clicked on it.
Gib
Re: making visible disabled JComponents
Quote:
Originally posted by gibby
Hello everyone,
I'm just wondering if there's a way to set a JComponent to disabled (ie. Component.setEnabled(false)) without having its appearance greyed out. That is - conserve it's look & feel such that the user would not be able to tell it was disabled unless she clicked on it.
Gib
no, because this is not good HCI practice. Why would you want a component that looks like it works, but doesnt actually work when the user tries?
How would you like to be stuck in a burning building, with fire-doors around the place but every time you approach them and push them, you realise that they are just painted on the wall, they arent actually doors at all?
Never lose sight of that fact that you wrote a program; it takes a modicum of intelligence and understanding of computers to do so. Users did not write your program, they do not know how it works, nor are they all the most intelligent people on the planet.
When faced with something unknown, frightening and incomprehensible, they will initially look for things they might recognise - things that might get them from A to B.. If you go misleading them you will irritate them no end.
Plus, if someone like me every used your program, you would get a very lengthy, and very critical email, offering advice on the weak points of your user interface.
In your particular situation you must consider all inputs, you must consider the inputs that are valid, and constrain the user to only those inputs. If they type alphamerics, kill the event so that no alphameric appears in the field, only numeric.. etc