Adblock breaks this site

Java Form

Discussion in 'Programming General' started by Draucia, Dec 9, 2009.

  1. Draucia

    Draucia Guest

    Referrals:
    0
    Java Form

    I have a simple question:

    Can java make ordinary looking forms? All the java applications I see have this java type form, this java type file browse tool.

    [​IMG]

    Tic tac toe game made by suf.

    Can java have a form like the one on the right?
     
  2. SuF

    SuF Legend
    Pirate Retired Global Moderator

    Joined:
    Jan 21, 2007
    Posts:
    14,212
    Referrals:
    28
    Sythe Gold:
    1,234
    Discord Unique ID:
    203283096668340224
    <3 n4n0 Two Factor Authentication User Community Participant Spam Forum Participant Sythe's 10th Anniversary
    Java Form

    You can set the look and feel of it.... Jimmy does it a lot... I never have because I don't care. InbeforeJimmy.
     
  3. war833

    war833 Member

    Joined:
    Dec 11, 2008
    Posts:
    82
    Referrals:
    0
    Sythe Gold:
    0
    Java Form

    google java lookandfeel
     
  4. Jimmy

    Jimmy Ghost
    Retired Sectional Moderator $5 USD Donor

    Joined:
    Jun 24, 2008
    Posts:
    2,421
    Referrals:
    10
    Sythe Gold:
    25
    Java Form

    I lol'ed.

    First of all, the first window is seen under the Aero theme on Vista, whereas the second is seen on Windows XP. This accounts for the clear frame, as opposed to the blue one. This can be observed in Java programs that don't change the LookAndFeel at all (Example: JMacro back in 2007). If you want your Java applications to have a more native-looking LookAndFeel, as opposed to the default MetalLookAndFeel (the cross-platform one), then you have several options.

    • Use AWT. The downside to this is that most of your components will look rather old.
    • Use SWT. The downside to this is that you have to include external libraries with your application. This, like AWT, is a wrapper to native GUI components, however these generally look more modern than AWT components.
    • Use Swing, but call the setLookAndFeel() method in the UIManager class. This is probably the easiest solution, as you can still make all of your GUI in Swing. The code for doing this would be placed before you create your GUI, and would be something along the lines of:
      Code:
      UIManager.setLookAndFeel(UIManager.getCrossPlatformLookAndFeelClassName());

    Hope I helped.
     
< A method for closing form1 then opening form2 | [TUT] C# How to add a Basic Password to Programs >


 
 
Adblock breaks this site