Java Form

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

Java Form
  1. Unread #1 - Dec 9, 2009 at 4:10 PM
  2. Draucia
    Referrals:
    0

    Draucia Guest

    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?
     
  3. Unread #2 - Dec 9, 2009 at 5:03 PM
  4. SuF
    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

    SuF Legend
    Pirate Retired Global Moderator

    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.
     
  5. Unread #3 - Dec 17, 2009 at 9:11 PM
  6. war833
    Joined:
    Dec 11, 2008
    Posts:
    82
    Referrals:
    0
    Sythe Gold:
    0

    war833 Member

    Java Form

    google java lookandfeel
     
  7. Unread #4 - Dec 19, 2009 at 8:03 PM
  8. Jimmy
    Joined:
    Jun 24, 2008
    Posts:
    2,421
    Referrals:
    10
    Sythe Gold:
    25

    Jimmy Ghost
    Retired Sectional Moderator $5 USD Donor

    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 >

Users viewing this thread
1 guest


 
 
Adblock breaks this site