Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 505763
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T06:37:54+00:00 2026-05-13T06:37:54+00:00

I am developing a desktop Java application with GUI implemented through Swing . I

  • 0

I am developing a desktop Java application with GUI implemented through Swing. I have made a JFrame and have added three buttons on it – Add, Edit, Delete.

Now I want that whenever a user clicks on any of the button, the content specific to that button appears besides those three buttons.

So how to implement this? Should I need to add a JPanel besides those three buttons and then add the content specific to the button to that JPanel?

So far, I have taken a JFrame and have added 3 buttons on it. That’s it.

For the Add button, I want to add some buttons and textfields to add information to the database.

For the Delete button, I want to add some buttons to find records in the database based on the information entered through the user in the textfield that appears when the user clicks on the Delete button.

Similar type of content for Edit button.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T06:37:55+00:00Added an answer on May 13, 2026 at 6:37 am

    So how to implement this. Should I need to add a JPanel besides those three buttons and then add the content specific to the button to that JPane

    That would be fine. When you push the button, you can call JPanel.removeAll() to remove all the controls currently in the control, and then just do the layout again, specific to whatever button you pushed.

    If you have custom swing controls, just add your custom control the JPanel using a BorderLayout and putting in the center.

    Another option would be to use a CardLayout, and flipping between the cards when a user presses one of the buttons. If the layouts for the buttons never change, that would probably be a better way to do it. Obviously if the content changes between button presses, you’ll need to redo the layout each time.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 296k
  • Answers 296k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Oracle's VARCHAR2 treats empty strings as NULL.So if tname !=… May 13, 2026 at 7:07 pm
  • Editorial Team
    Editorial Team added an answer I could get the expected result by: Removing the \b… May 13, 2026 at 7:07 pm
  • Editorial Team
    Editorial Team added an answer You can't do what you were originally thinking directly. You… May 13, 2026 at 7:07 pm

Related Questions

I am using a quad-core windows XP based Dell Machine machine in my office
Am coding an AIR 1.5 app in which I want to do a remote
I am developing a Java desktop application and would like to have an external
I am developing a desktop app using Java and Swing Application Framework. I have
I am developing a Java based desktop application. There are some data generated from

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.