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 6739799
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T11:31:51+00:00 2026-05-26T11:31:51+00:00

I am using a JFrame & JPanel to create a frame.JFrame contains comboboxes,CheckBoxes,JLabels etc.Layout

  • 0

I am using a JFrame & JPanel to create a frame.JFrame contains comboboxes,CheckBoxes,JLabels etc.Layout of JPanel is set to “null”,because i am using setBounds(int,int,int,int) to set the position of components on JFrame.

There is also a JButton(named as “Submit”).On submit button i have added actionListener,so that if i click on this button,A table will generate on frame(at runtime).

JTable is successfully displaying on JFrame but Table columns name are not displaying along with JFrame(Only table data is displaying when submit button is pressed).

I am also using setBounds with JTable.What should i have to do in this case ?

submitButton.addActionListener(new ActionListener()
{
    public void actionPerformed(ActionEvent e)
    {
       Object ColumnName[] = {"Document Name", "Modified Date", "Size(in MB)"};
       Object data[][] = { {"test.txt", "24-Oct-2011", "540"}};
       table = new JTable(data,ColumnName);
       table.setBounds(20,230,330,100);
       panel.add(table);
       panel.repaint();
       panel.revalidate();
     }
});

Give me your all valuable suggestions soon.
Thank you.

  • 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-26T11:31:52+00:00Added an answer on May 26, 2026 at 11:31 am

    may it works revalidate(); method of panel . call after setting table on panel.
    but JScrollPane is best way to do this.

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

Sidebar

Related Questions

I want to access JFrame(GraphicsConfiguration) using SwingBuilder.frame(), but I can't set it via the
I am using swing to create my GUI. J have a JFrame containing one
I'm using setUndecorated(true); and getRootPane().setWindowDecorationStyle(JRootPane.FRAME); in my jFrame. This works great but now when
I've created a frame with a 3x3 grid of buttons using this code... JFrame
I have a JFrame inside of which is a jpanel that im using as
I have a problem. I have a JFrame with some JTextFields, JLabels, Jlists &
I am using JFrame to create my GUI for a desktop application. The size
I'm using JFrame.setIconImages to set the icons for a JFrame in my application, working
I am using JFrame and I have kept a background image on my frame.
I am using a JFrame as a pop-up from a main frame, where the

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.