Page 2 of 2 FirstFirst 12
Results 21 to 27 of 27
Like Tree3Likes

Thread: Swing vs AWT

  1. #21
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    26

    Default Re: Swing vs AWT

    E. Hughes: I don't agree with the first part of your answer (post #17), but I have to say that the second part's not bad, not bad at all. Although you've kind of stacked the deck on the short vs. long code bit since creating a Swing app doesn't necessarily mean writing less code.

  2. #22
    Tha Boss is offline Member
    Join Date
    Jun 2012
    Location
    ON, Canada.
    Posts
    25
    Rep Power
    0

    Default Re: Swing vs AWT

    How would you use the components form Swing when to me it seems like you can't use your f.add() or normal object items?
    If you're talking about customizing like the buttons.. it's pretty simple:
    Java Code:
    String[] options = {"Button1", "Button2", "Button3"};
                int userChoice = JOptionPane.showOptionDialog(null,
                        "Would you like button1, 2, or 3?",
                        "Make your Choice", //Title of the dialog.
                        JOptionPane.DEFAULT_OPTION,
                        JOptionPane.QUESTION_MESSAGE,
                        null, //Custom icon.
                        options, //The titles of the buttons.
                        options[0]); //Default button.
    Also, the following link is good for getting started with swing...
    How to Make Dialogs (The Java™ Tutorials > Creating a GUI With JFC/Swing > Using Swing Components)
    Last edited by Tha Boss; 06-20-2012 at 01:55 AM.

    E.Hughes
    "I'm sometimes hard to please... because I'm only satisfied with the very best." - Fernand Point.

  3. #23
    Tha Boss is offline Member
    Join Date
    Jun 2012
    Location
    ON, Canada.
    Posts
    25
    Rep Power
    0

    Default Re: Swing vs AWT

    @Fubarable yes, I know... I made it clear I'm a bit biased for swing, but let's hear... what part of swing is more coding than AWT???
    Last edited by Tha Boss; 06-20-2012 at 01:58 AM.

    E.Hughes
    "I'm sometimes hard to please... because I'm only satisfied with the very best." - Fernand Point.

  4. #24
    DarrylBurke's Avatar
    DarrylBurke is offline Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,242
    Rep Power
    19

    Default Re: Swing vs AWT

    Quote Originally Posted by Tha Boss View Post
    what part of swing is more coding than AWT???
    1. All parts that allow you to do something you just can't do in AWT.

    2. One question mark denotes a question. Multiple question marks denote childishness.

    db
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

  5. #25
    RichersooN is offline Senior Member
    Join Date
    Jan 2011
    Location
    Rizal Province, Philippiines
    Posts
    167
    Rep Power
    0

    Default Re: Swing vs AWT

    Both for gui's but pretty much swing is just an improved version of awt.

  6. #26
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,529
    Blog Entries
    7
    Rep Power
    20

    Default Re: Swing vs AWT

    Quote Originally Posted by RichersooN View Post
    Both for gui's but pretty much swing is just an improved version of awt.
    Sure and Java is a slight improvement over Visual Basic.

    kind regards,

    Jos
    cenosillicaphobia: the fear for an empty beer glass

  7. #27
    KevinWorkman's Avatar
    KevinWorkman is offline Crazy Cat Lady
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    3,963
    Rep Power
    8

    Default Re: Swing vs AWT

    Norm pretty much covered it already, but I just want to point out that there are dozens or hundreds of posts here, each with an urgent user waiting on an answer from us. So even though it probably only took you about 15 minutes to throw together that post, if you multiply that time by the number of posts here, there's no way we can get to all of them.

    To help expedite the process, we try to encourage people with questions to narrow the problem down- not only does that help us answer the question more effectively, researching a problem is also an extremely important lesson for people to learn, perhaps more important than the code itself.

    We ask what people found on google, or what exactly about what they found confused them, not to ping-pong the problem somewhere else, but to really get at the actual question- almost every question is hiding a simpler, more technical, more exact question- people will ask "how do I do this?" when really they mean "why did this specific attempt not work?". So we ask "what did you try?" to get at the hidden question, and to get the OP thinking about the problem on their own. This is especially true of broad, general questions like this- not only have they been covered in more detail on websites that are just a google search away, but it's usually not clear what the OP is actually confused about. For similar reasons, we ask for an SSCCE- not because we're lazy and don't want to help, but because the best way to help is to get the OP thinking about exactly where the problem is, what the actual question is, etc. When we have it boiled down to that, then we can offer links to specific tutorials, code examples, and API docs.

    It's great that you want to help, but I would bet in time you'll find that the best way to help people is to get them to help themselves. Actually, with your terrible attitude I don't expect you'll last long here at all, but I've been wrong before.

    I'm locking this thread before you degrade it further. Feel free to post your complaints in your own thread.
    How to Ask Questions the Smart Way
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

Page 2 of 2 FirstFirst 12

Similar Threads

  1. I need help about swing...
    By CANN1 in forum AWT / Swing
    Replies: 2
    Last Post: 03-31-2012, 02:50 PM
  2. Swing To Jsp
    By jim in forum Advanced Java
    Replies: 1
    Last Post: 10-09-2011, 11:51 PM
  3. help with Swing (GUI)
    By Bagzli in forum New To Java
    Replies: 8
    Last Post: 04-04-2011, 12:18 AM
  4. where is the swing jar?
    By katie in forum AWT / Swing
    Replies: 1
    Last Post: 08-06-2007, 10:58 PM
  5. map javax.swing.text.Element to javax.swing.text.View
    By elizabeth in forum New To Java
    Replies: 1
    Last Post: 07-30-2007, 07:02 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •