Search code examples
javaswinguser-interfaceuser-accounts

Create a 'User Account' interface like in Windows using Java


I am developing an aplication for which I have to create an 'User Account' control panel similar to that in Winodows OS, Where logged in user can manage other users, his own password, etc.

I request you to please check how the 'User Account' control panel in Windows looks like and works.

Now you have noticed that there are options which look similar to web-links(when you bring your pointer on them, arrow changes to hand symbol), when you click on them, a different form is loaded on the same frame. Ex: What happens when you click on 'Change your password'?

I am not getting how to do this and how can we provide options that look like hyperlinks and on-clicking them, change the form.


Solution

  • On Windows such hyperlinks are implemented with SysLink standard control introduced with Windows XP.

    There's no Link control in Swing. However, you can use JXHyperlink from SwingX library, it's under LGPL-2.1 license.

    If this license is not acceptable, then you can even implement one yourself. Custom component would look like label but behave as a button.


    To change "forms", you would switch a displayable panel when user clicks a command link. I mean you'll hide the currently visible panel and display the new panel which provides UI for the command user clicked. You can think of it as a tabbed dialog but tab bar is invisible and you switch the active tab programmatically.