Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 9 of 9

Thread: Problem with swing-buttons

  1. #1
    Junior Member
    Join Date
    Sep 2010
    Posts
    8
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default Problem with swing-buttons

    Hi! I'm having some problems with a program i'm writing, the problem i'm facing is that i've created a few buttons using swing. But when I press the buttons nothing happens except for one button. For example, i've created two buttons, one is "Draw a card" and another is "Stop" and "Exit to OS", but Draw a card and Stop does not work but Exit to OS does. I don't understand why, any help would be appreciated
    Last edited by Minken; October 14th, 2010 at 12:17 PM.


  2. #2
    Crazy Cat Lady KevinWorkman's Avatar
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    5,424
    My Mood
    Hungover
    Thanks
    144
    Thanked 636 Times in 540 Posts

    Default Re: Problem with swing-buttons

    If you want help, you'll have to provide a short (fits in one file), self-contained (we can copy it, paste it into a text file, compile it, and run it without making any changes to anything), compilable example- also known as an SSCCE. You have way too much extra stuff for people to wade through.

  3. #3
    mmm.. coffee JavaPF's Avatar
    Join Date
    May 2008
    Location
    United Kingdom
    Posts
    3,336
    My Mood
    Mellow
    Thanks
    258
    Thanked 294 Times in 227 Posts
    Blog Entries
    4

    Default Re: Problem with swing-buttons

    Please use highlight tags instead of code tags.

    I've also moved this thread to the correct forum - AWT / Java Swing - Java Programming Forums
    Please use [highlight=Java] code [/highlight] tags when posting your code.
    Forum Tip: Add to peoples reputation by clicking the button on their useful posts.

  4. #4
    mmm.. coffee JavaPF's Avatar
    Join Date
    May 2008
    Location
    United Kingdom
    Posts
    3,336
    My Mood
    Mellow
    Thanks
    258
    Thanked 294 Times in 227 Posts
    Blog Entries
    4

    Default Re: Problem with swing-buttons

    I'm taking a look at this but I can't get the code to compile.

    See if this link helps you move forward - http://www.javaprogrammingforums.com...ava-swing.html
    Please use [highlight=Java] code [/highlight] tags when posting your code.
    Forum Tip: Add to peoples reputation by clicking the button on their useful posts.

  5. The Following User Says Thank You to JavaPF For This Useful Post:

    Minken (October 14th, 2010)

  6. #5
    Junior Member
    Join Date
    Sep 2010
    Posts
    8
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default Re: Problem with swing-buttons

    I've solved the problem, thank you very much for the respons!
    Last edited by Minken; October 14th, 2010 at 12:17 PM.

  7. #6
    mmm.. coffee JavaPF's Avatar
    Join Date
    May 2008
    Location
    United Kingdom
    Posts
    3,336
    My Mood
    Mellow
    Thanks
    258
    Thanked 294 Times in 227 Posts
    Blog Entries
    4

    Default Re: Problem with swing-buttons

    No problem.

    What was your solution in the end? Did you adopt a new method or find the errors in your original code?
    Please use [highlight=Java] code [/highlight] tags when posting your code.
    Forum Tip: Add to peoples reputation by clicking the button on their useful posts.

  8. #7
    Junior Member
    Join Date
    Oct 2010
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Problem with swing-buttons

    hai I want to know about how to add status bar in textarea

  9. #8
    Member Darryl.Burke's Avatar
    Join Date
    Mar 2010
    Location
    Madgaon, Goa, India
    Posts
    494
    Thanks
    8
    Thanked 48 Times in 46 Posts

    Default Re: Problem with swing-buttons

    Quote Originally Posted by arunamathi View Post
    hai I want to know about how to add status bar in textarea
    So start your own thread, they're free. Why try to hijack a thread with an unrelated question?

    db

  10. #9
    Forum VIP
    Join Date
    Jul 2010
    Posts
    1,676
    Thanks
    25
    Thanked 329 Times in 305 Posts

    Default Re: Problem with swing-buttons

    Quote Originally Posted by Darryl.Burke View Post
    So start your own thread, they're free. Why try to hijack a thread with an unrelated question?

    db
    WHAT! FREE! I've been getting robbed...
    NOTE TO NEW PEOPLE LOOKING FOR HELP ON FORUM:

    When asking for help, please follow these guidelines to receive better and more prompt help:
    1. Put your code in Java Tags. To do this, put [highlight=java] before your code and [/highlight] after your code.
    2. Give full details of errors and provide us with as much information about the situation as possible.
    3. Give us an example of what the output should look like when done correctly.

    Join the Airline Management Simulation Game to manage your own airline against other users in a virtual recreation of the United States Airline Industry. For more details, visit: http://airlinegame.orgfree.com/

Similar Threads

  1. simple game with swing and awt problem
    By Pulse_Irl in forum AWT / Java Swing
    Replies: 2
    Last Post: October 12th, 2010, 02:04 PM
  2. [SOLVED] Java Swing problem?
    By nasser in forum AWT / Java Swing
    Replies: 2
    Last Post: July 3rd, 2010, 12:34 PM
  3. Need more buttons!
    By GotWankel? in forum AWT / Java Swing
    Replies: 0
    Last Post: October 5th, 2009, 01:08 AM
  4. Swing problem, newbie'ish . Perhaps thread related?
    By fenderman in forum AWT / Java Swing
    Replies: 3
    Last Post: July 22nd, 2009, 04:45 AM
  5. [SOLVED] [Problem] imports javax.swing problem
    By Brollie in forum AWT / Java Swing
    Replies: 8
    Last Post: July 5th, 2009, 07:59 AM