1

Im creating a system that is standalone and not online. It is a java based system. I just want to make my UI look like those in Windows 8. Will that be possible?

| |
6

Using Java FX and CSS you can mimic the Windows 8 Metro interface.

See here : http://code.makery.ch/java/javafx-2-tutorial-part4

Or here : http://pixelduke.wordpress.com/

| |
  • 1
    woah thanks.. but will this still be working even if i am not programming in J2EE ? because my system is coded in pure java only. – harraypotter Jan 29 '14 at 9:43
  • @Pink000 Off course, Java FX is a rich client API. It uses Swing-like components. – jeroen_de_schutter Jan 29 '14 at 10:39
2

If you use Swing, just add the following lines to the beginning of your program:

try
{
  UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
}
catch(Exception e){}// if it fails, your program might look ugly but still work

This just tells Swing to use a look and feel that matches the System. I.e. if your program runs on Windows 8, the look and feel will be that of Windows 8.

The JRE should not be too old for that. Note, that this means the Desktop’s Look&Feel, not the Metro Style as with the standard JRE the Java applications will run as desktop applications not Metro apps. But using these line above you have done everything necessary to look like a Metro app if there will be a Metro-App JRE in the future.

| |
  • Thank you! That was helpful. I was trying to achieve it but then because of what u said, i know it will not be possible for I am running windows 7 :( – harraypotter Jan 29 '14 at 9:35
0
If you are using swing then you can make it look like Windows 8 regardless of the OS you're running, but it will take a lot of work. You will need to create your own custom look and feel that looks the same as windows 8. Here is a tutorial that shows how to do that.


Another option - also pretty time-intensive - is to override the look and feel of each individual component so that it mimics the equivalent windows 8 component.
| |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.