Results 1 to 3 of 3
  1. #1
    chrscote is offline Member
    Join Date
    Oct 2013
    Posts
    3
    Rep Power
    0

    Default Changing JButtons at bottom of form

    In one of my Java classes, we created a form that simply read through a text file consisting of data for a team roster and displayed each player individually by clicking previous and next buttons (which are in a sub-JPanel). Now, I would like to create a way to add new players to the roster. I have been able to have the "New Player" option clear the text in the form so the user can enter text. However, I can't figure out how to change the buttons at the bottom from the "< Prev" "Next >" to "Save" and "Cancel" buttons. Is there a way to remove the original buttons and replace them with a different set of buttons?

    Chris Cote

  2. #2
    sakray is offline Member
    Join Date
    Oct 2013
    Posts
    5
    Rep Power
    0

    Default Re: Changing JButtons at bottom of form

    Maybe create all buttons and then hide or set the buttons as visible depending on what you want to do. Not an expert, I'm sure someone will have a better way for you later.

  3. #3
    monkeyjr97 is offline Senior Member
    Join Date
    Nov 2012
    Posts
    258
    Rep Power
    2

    Default Re: Changing JButtons at bottom of form

    cardLayout maybe of help to you

Similar Threads

  1. Help changing code to different form
    By tsing520 in forum New To Java
    Replies: 6
    Last Post: 10-12-2013, 03:36 AM
  2. changing position of Jbuttons
    By beginnerprog in forum New To Java
    Replies: 3
    Last Post: 03-10-2013, 12:38 AM
  3. Replies: 27
    Last Post: 04-06-2012, 02:37 PM
  4. POI changing text to a form label
    By natt in forum Advanced Java
    Replies: 2
    Last Post: 09-19-2008, 10:49 AM
  5. JButtons in a straight line on the BOTTOM
    By paul in forum AWT / Swing
    Replies: 0
    Last Post: 07-16-2007, 04:47 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
  •