Disabling a panel and its children---help

I have textfields and JComboBoxes in my JPanel.
Depeding on some conditions, I would like to disable
the user from entering any value in the text fields and
choosing from JComboBox. If I set the setEnabled method to false,
the existing values in those fields greyed-out. Because
of this, the fields look "dull". Is there anyway, I can disable
those fields while the look and feel remains the same.
Thanks.

morgalr,
I can see both points. I agree wholeheartedly with you that when programmers stick to standards things are much better for users. Let me as-sure you that I am the first (and loudest) complainer about this. When I am forced to use a GUI that does not conform to my accustomed collection of [keyboard shortcut/mouseless usablility] features, I am famous for shamelessly cussing the thoughtless designer/programmer.
I think that disabled/grayed-out looking controls tell the user "I am not relevant right now". But sometimes you don't want the control to say "I am not relevant right now", but rather "I am displaying useful information in a place where it makes sense for you to see it but not to change it right now". And grayed-out controls can be difficult to read.
For example, I once had an application that listed 15 rows of information about slots in a physical device I was talking to serially. The 15-row list served a dual purpose: it showed software config info corresponding to each physical slot, and it allowed editing of slot's configuration only if the slot was not configured yet. Since each row consisted of a label, a combobox, 2 textfields, and a button, disabling some rows looked ugly and made the information presented difficult to read (in other words, the configured information looked less important than the not-yet-configured info, when it should have been looking more important). Furthermore, in the case when a row corresponded to an absent physical device, that row rightfully needed to be disabled. I chose to make my own disabled look for the not-yet-configured rows. It involved hiding the button, changing the background of the label, textfield, and background panel itself to yellowish (so that they didn't really look like controls anymore), but they were still lined up with and had a consistant look as the non-disabled rows. For real-estate purposes, this single list was a very intuitive way to look at this info -- At a glance user could tell (1) which rows were already configured, (2) the configuration information about those rows, (3) which rows needed to be configured, and (4) which rows were irrelevant.
I know it's hard to explain the GUI theory without showing, but I am trying to give example of a situation when overriding the normal disabled look was a good thing. But the comboboxes could not easily have their look changed, and that caused me grief (I was still quite a newbie then and hadn't ever dreamed of overriding the UI or subcomponents of anything).
/Mel

Similar Messages

  • Copy Parent and its children records

    Hello:
    I have a requirement to implement the "deep copy" functionality i.e. copy Opportunity and its children records including Contact, Opportunity Product Revenue etc. Can this be accomplished with the weblink, web services or any other options? I have went over the Oracle web services Guide doc, but I am still not sure what steps need to take in order to implement this "deep copy" functionality. Could you direct me to any reference docs to implement this?
    Thanks in advance!
    -AJ

    Briefly, it looks like this.
    "Deep copy", as you describe it, can be just a programmatic manipulation of data via WebServices. So your program would go through these steps:
    - login to WS (or use stateless sessions)
    - use Query method on Opportunity object Web Service to retrieve all fields from the record, and all child records
    - create new Opportunity record, by calling Insert method
    - create child records of all types you need, also by calling Insert method (in WS 1.0 you will use InsertChild)
    Exact details depend on your programming language.
    You may need to use both 1.0 and 2.0, or select which version to use, because these two interface support different child objects.
    In any case, there is no way to create both parent and children in one call - you create Opportunity record, and then reference its ID in new child objects.
    Hope it helps.

  • My iPhone 4s won't go home, shut down, go to any other app bc its on twitter now frozen there and it won't reboot it wont let me force lock it and its frustrating. help!

    my iPhone 4s won't go home, shut down, go to any other app bc its on twitter now frozen there and it won't reboot it wont let me force lock it and its frustrating. help!

    Hi mltmj123,
    Welcome to the Support Communities!
    To address this issue, I would suggest you close all open apps, then restart and reset your iPhone.  Here's how:
    iOS: Force an app to close
    http://support.apple.com/kb/ht5137
    iPhone, iPad, iPod touch: Turning off and on (restarting) and resetting
    http://support.apple.com/kb/ht1430
    Cheers,
    - Judy

  • Accessing to Windows Server 2003 SP2 R2 32-bit from a Windows XP SP3 32-bit leaves a fork of the explorer and its children processes !!!

    When I try to access to Windows Server 2003 SP2 R2 32-bit from a Windows XP SP3 32-bit and then closes the RDP from Windows XP (the client side), a fork of the explorer and its children processes will persist in the server side !!!
    Take a look at the screenshot to understand:
    is this normal behavior !?
    Thank you for your understanding ;)

    Hi,
    I think this is normal behavior.
    You just close the RDP from client side but not log off the server, right?
    Regards.
    Vivian Wang
    Yes, right I closed the RDP from client side, not log off the server.

  • Drag a container and its children

    Hi,
    How do i drag a container and its children? 
    I see you can drag something and its parent, but i don't see how you can get the child from the draginitiator. 
    Thanks

    I've had a chance to play with this now and I had a pop at using the JLayeredPane, throwing a component to the top which is a MouseListener and KeyListener and consume()s all the events. Works fine for the most part, until there's a JButton within the component - they manage to carry on handling events despite the consuming component over the top of them. Hover over them and they repaint, they're clickable, and so on. Hmm.

  • Disabling events for a container and its children

    I've stumbled across this one and don't currently have time to find a full solution, so just wondering if anyone else has implemented the same...
    I have a class which extends JPanel and adds a "wait(boolean)" method - when called with 'true' this kicks off a Timer which repaints with an animated overlay until it is called again with 'false.' The overlay is simply painted, it's not an actual component.
    All well and good so far.
    However, what I'd like to do is also disable mouse/key/etc events within that panel. Let's say one of the components which it contains is a table - I don't want the user to be able to change the selected row whilst the panel is in 'wait mode.'
    Since Swing uses a bubble-up event model, this isn't trivial - the on-liner solutions such as calling setEnabled() or overriding processEvent() won't work because the component itself doesn't actually receive the events.
    So, the solutions off the top of my head are,
    1. when wait is called, lock and traverse the tree and disable/enable all the components within it - not a good solution as this disrupts the state of the components and even if a map is maintained, and changes to the hierarchy during wait mode will cause trouble
    2. use the panel as a container for a wrapped panel plus an overlay which is only visible during wait mode, delegate various methods to the wrapped panel - I don't like this as it means overriding a whole truckload of methods and it feels fragile
    3. when wait is called, inject an overlay panel into the component tree - I don't like this either as it means understanding the panel's context in its parent (eg it might be the center of a BorderLayout or it might be the left component in a JSplitPane) and it also has obvious implications for events such as ComponentEvent on the children
    4. wrap a panel as per 2 and instead of delegating, simply provide a "getPanel()" method to obtain it - perfectly functional but utterly ugly and it allows people to easily and comprehensively break the behaviour if they wish
    I can't help feeling there's something obvious I'm missing :o) ...I'm thinking more along the lines of a composition model rather than extension now, but I think I fundamentally still have similar issues.
    Anyone got any ideas?

    I've had a chance to play with this now and I had a pop at using the JLayeredPane, throwing a component to the top which is a MouseListener and KeyListener and consume()s all the events. Works fine for the most part, until there's a JButton within the component - they manage to carry on handling events despite the consuming component over the top of them. Hover over them and they repaint, they're clickable, and so on. Hmm.

  • ITunes disables cd burner and player! Help!

    As part of my job, I create a lot of audio cds. All was going fine until the middle of last year when an iTunes update, I believe it was something in the 7's stopped my computer from recognizing the factory-installed cd burner. All subsequent updates including the current 8.1 cause the message "disk burner or software not found" each time I try to burn in iTunes (I can't burn from Finder either). Disc playing wasn't too much of a problem save for the occasional stuck cd which had to be force-ejected when the burner suddenly "disappeared". With this new update I can't read or write at all - I've tried all the gimmicks to make things work like zapping the p ram, holding down mouse during start to force eject, using disk utility to fix permissions, etc. We all KNOW this is an ITUNES SOFTWARE GLITCH. My computer was FINE until that first faulty iTunes update. Can somebody PLEASE help as my work depends on it and I can't afford a new computer? Thanks!

    look here,
    http://www.randomfix.com/2007/04/12/windows-vista-%E2%80%93-missing-cddvd-rom-dr ive/
    or here:
    http://www.gearsoftware.com/support/forum/search.php?search_author=Frans
    Good luck, it is one of the famous digital-stone-age problems of Microsoft

  • Why will iCloud not recognise my username (email address) i tried to recreate the account but it tells me its already in use, and i tried changing the password like 6 times and its not helping it also won't recognise my details on my new 4s .... why ?

    please help

    The idea to jumpstart by change was not the smartest one, but gives you an opportunity to use that "temporary" account as permanent. You do not have a choice cause obviously despite you thinking that old account is no more -it does exist on Apple servers. And if you are unwilling to share your [email protected] with friend, just create one extra [email protected] for your friend. One suggestion - do not use gmail.

  • I have forgotten my passcode for my iphone and its now saying "iPhone is disabled connect to itunes" but i need to get in the phone to do anything first but i cant !!! please help me i will be so greatful

    i have forgotten my passcode for my iphone and its now saying "iPhone is disabled connect to itunes" but i need to get in the phone to do anything on itunes !!! please help me i will be so greatful

    Locked Out, Forgot Lock or Restrictions Passcode, or Need to Restore Your Device: Several Alternative Solutions
    1. iOS- Forgotten passcode or device disabled after entering wrong passcode
    2. iPhone, iPad, iPod touch: Wrong passcode results in red disabled screen
    3. Restoring iPod touch after forgotten passcode
    4. What to Do If You've Forgotten Your iPhone's Passcode
    5. iOS- Understanding passcodes
    6. iTunes 10 for Mac- Update and restore software on iPod, iPhone, or iPad
    Forgotten Restrictions Passcode Help
    You will need to restore your device as New to remove a Restrictions passcode. Go through the normal process to restore your device, but when you see the options to restore as New or from a backup, be sure to choose New.
    Also, see iTunes- Restoring iOS software.

  • HT4061 My Child has disabled my ipad mini...It ran out of charge and now is disabled for 22928370 minutes, what can I do as I cant get onto the ipad to get the serial number to speak to an advisor and its only 10 months old. HELP!

    Please help me....
    My Child has disabled my ipad mini...It ran out of charge and now is disabled for 22928370 minutes, what can I do as I cant get onto the ipad to get the serial number to speak to an advisor and its only 10 months old. HELP!

    Hello Jesslocko,
    Before following the iPad Restore process make sure you have updated version of iTunes installed on your computer, to check that Open iTunes on your computer click on Help and then check for updates ( If there is any updates available then Install it ) and If you do not have iTunes Installed or if you want to directly update the version of your iTunes then Download and Install iTunes from here : http://www.apple.com/itunes/download/
    1. Make sure your device (iPad) is unplugged (Disconnected) from your computer (this should be the computer that you use to sync your iPad or you can use any other computer with iTunes installed in it). You can leave the USB cable connected to your iPad though.
    2. Turn off your iPad. Press and hold the power button on the top edge until a slider appears. Slide it from left to right to power off your device. If the slider doesn't appear (because your iOS device has frozen up) then hold the power and Home buttons down until the iPhone or iPad turns off.
    3. Ensure your device has a decent amount of charge. Leave it plugged in to the mains for 10 minutes or so if you see the flat battery icon. (iPad low battery)
    4. Hold down the Home button (the round button at the bottom of your iPad screen) and connect the other end of USB cable to the computer this should cause your iPhone or iPad to turn on. Keep holding the Home button until you see the iTunes and USB cable images on your iPad screen, then release the button.(iPad recovery mode)
    5. In iTunes (launch the application if it isn't running on your Computer), you should see a message saying an iPad has been found in recovery mode.
    6. Click OK and then click on Restore to bring your iPad to Factory settings

  • SOMEONE PLEASE HELP ME THIS IS MY FIRST TIME DOING THIS MY IPOD IS DISABLED AND IT SAID CONNECT TO I TUNES I DID THAT AND ITS NOT WORKING HELP ME PLEASE AND THANK U

    SOMEONE PLEASE HELP ME THIS IS MY FIRST TIME DOING THIS MY IPOD IS DISABLED AND IT SAID CONNECT TO I TUNES I DID THAT AND ITS NOT WORKING HELP ME PLEASE AND THANK U

    Please turn off your caps lock.
    See http://support.apple.com/kb/HT1212.

  • HT1212 hi my daughter has disabled her iphone 4 and its never been synced with itunes can anyone help please

    hi my daughter has disabled her iphone 4 and its never been synced with itunes can anyone help please

    iOS: Forgotten passcode or device disabled after entering wrong passcode - http://support.apple.com/kb/ht1212 - Learn what to do if you have forgotten or can't remember your passcode, or if your device displays a message saying it is disabled.

  • HT1212 i have tryed recovering my ipod and its not its still disabled can someone please help me

    I have tryed recovering my ipod and its still not diabled can someone please help me

    Try letting the battery fully drain. After charging for an hour try recovery and DFU modes.
    Try on another computer
    Last, make an appointment at the Genius Bar of an Apple store.
    Apple Retail Store - Genius Bar

  • My imad 'lol' mini  say i set up an icloud account when i first got it and its been disabled everytime i try to reset it it prompts me to a different email how can i reset the origanal

    my imad 'lol' mini  say i set up an icloud account when i first got it and its been disabled everytime i try to reset it it prompts me to a different email how can i reset the origanal

    Hi JackEDupdog,
    Welcome to the Support Communities!  The article below will help you troubleshoot the issue you are having with your Apple ID:
    Apple ID: Contacting Apple for help with Apple ID account security
    http://support.apple.com/kb/HT5699
    Cheers,
    - Judy

  • I can't uninstall Firefox(3.6.3) either through the control panel or by going to Program files/Mozilla Firefox/Uninstall and running the helper.exe, I have Windows 7 Home Premium(64bit)

    I simply want to uninstall Mozilla FireFox 3.6.3. I tried both recommendations of using the control panel to add/remove program and running the helper.exe in Program Files/Mozilla FireFox/uninstall. I am running Windows 7 Home Premium Edition(64bit). When I tried to remove it using the add/remove program and helper.exe all it does is start for a split second(mouse pointer turns into circular loading icon) and then it stops.
    == User Agent ==
    Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/531.22.7 (KHTML, like Gecko) Version/4.0.5 Safari/531.22.7

    Hi Guys,
    I had this same problem too, and i want to share to all of you my own fix for this kind of problem;
    (READ FIRST: ''This step will wipeout everything that mozilla saved on your computer including : password, history and bookmarks''.)'''
    '''1. download the Revo Uninstaller''''''
    - quick step guide for this:
    select mozilla firefox, don't forget to uninstall everything that relates to mozilla including registry to clean them all up.
    '''2. download mozilla firefox again'''
    - AND REINSTALL. however on this stage, in some cases mozilla will not open at this stage.
    '''3. Uninstall Mozilla firefox again NOW using control panel.'''
    '''4. Restart the computer to refresh everything.'''
    '''5. Reinstall mozilla firefox again, once you have received the prompt for "exporting or importing etc.. etc.. from Microsoft" that means its already working.. it will take around 5-10 sec to load up (in my case) .'''

Maybe you are looking for

  • Desktop Software and Roxio

    To Everyone at Blackberry I'd just like to thank you for causing me to spend almost 20 hours to date fixing all the problems with my PC (windows XP pro) that your awful sotware has caused. i really do NOT want to put this software back on my PC or an

  • Warning message in logs..

    Hi All, How do i remove this warning from my server log???? why does this occur??? 15:28:22,687 WARN [loggerI18N] [com.arjuna.ats.internal.jta.recovery.xarecovery1] Local XARecoveryModule.xaRecovery got XA exception javax.transaction.xa.XAExcepti on,

  • What caused my kernal Panic?

    I wish i could read this and make sense of it, but I cannot. Interval Since Last Panic Report: 1408827 sec Panics Since Last Report: 1 Anonymous UUID: 1433A7C0-1FE8-4ACC-9C75-098BAA1B4028 Sat Nov 27 21:13:30 2010 panic(cpu 1 caller 0x2aab55): Kernel

  • How to call a javabean with more argumets?

    I've create a javabean with more arguments,i've used fbean.add_arg: arglist := FBean.Create_Arglist; FBean.add_arg(arglist,'c:\dev10\esdir.fmb'); FBean.add_arg(arglist,wdata); FBean.add_arg(arglist,wtime); wprova:=FBean.invoke_char('BEAN_IMAGE',1,'ge

  • Help with downloading camera raw 8

    Where do I find the webpage to download camera raw version 8?