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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T15:20:06+00:00 2026-06-01T15:20:06+00:00

I created a window using the design panel in JFrame, it didn’t have any

  • 0

I created a window using the design panel in JFrame, it didn’t have any problem. But suddenly, When I try to edit my window using design, nothing shows up. I can’t even run that window, but if i start running it from the previous page, it shows up (I use the setVisible method to do this). You can see my code below:

import java.awt.EventQueue;

public class seat extends JFrame {

    private JPanel contentPane;

    public static void main(String[] args) {
        EventQueue.invokeLater(new Runnable() {
            public void run() {
                try {
                    seat frame = new seat();
                    frame.setVisible(true);
                } catch (Exception e) {
                    e.printStackTrace();
                }
            }
        });
    }

    public seat(String from, String to, String time, String date) {
        setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        setBounds(380, 230, 50, 300);
        this.setTitle("Flight Reservation System");
        contentPane = new JPanel();
        contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
        setContentPane(contentPane);
        contentPane.setLayout(null);

        JLabel time1 = DefaultComponentFactory.getInstance().createTitle("- " + time);
        time1.setBackground(SystemColor.windowBorder);
        time1.setForeground(Color.BLACK);
        time1.setFont(new Font("Tahoma", Font.PLAIN, 11));
        time1.setBounds(338, 16, 55, 25);
        contentPane.add(time1);

        JLabel from1 = DefaultComponentFactory.getInstance().createTitle(from.substring(0, 3));
        from1.setFont(new Font("Tahoma", Font.PLAIN, 11));
        from1.setBounds(65, 16, 38, 25);
        contentPane.add(from1);

        JLabel to1 = DefaultComponentFactory.getInstance().createTitle("- " + to.substring(0, 3));
        to1.setFont(new Font("Tahoma", Font.PLAIN, 11));
        to1.setBounds(84, 16, 55, 25);
        contentPane.add(to1);

        date = date.replace(".", "/");
        JLabel date1 = DefaultComponentFactory.getInstance().createTitle(date.substring(0, 11));
        date1.setFont(new Font("Tahoma", Font.PLAIN, 11));
        date1.setBounds(277, 16, 67, 25);
        contentPane.add(date1);

        JLabel label_14 = new JLabel("");
        label_14.setIcon(new ImageIcon("C:\\Users\\Emre\\Desktop\\asdasd.png"));
        label_14.setBounds(60, 47, 19, 108);
        contentPane.add(label_14);

        JLabel a1 = new JLabel(" ");
        a1.setIcon(new ImageIcon("C:\\Users\\Emre\\Desktop\\Untitled.png"));
        a1.setBounds(71, 58, 39, 43);
        contentPane.add(a1);

        JLabel koltuk1 = new JLabel(" ");
        koltuk1.setIcon(new ImageIcon("C:\\Users\\Emre\\Desktop\\Untitled.png"));
        koltuk1.setBounds(109, 58, 38, 43);
        contentPane.add(koltuk1);

        JLabel koltuk2 = new JLabel(" ");
        koltuk2.setIcon(new ImageIcon("C:\\Users\\Emre\\Desktop\\Untitled.png"));
        koltuk2.setBounds(147, 58, 38, 43);
        contentPane.add(koltuk2);

        JLabel label_1 = new JLabel(" ");
        label_1.setIcon(new ImageIcon("C:\\Users\\Emre\\Desktop\\Untitled.png"));
        label_1.setBounds(185, 58, 38, 43);
        contentPane.add(label_1);

        JLabel label_2 = new JLabel(" ");
        label_2.setIcon(new ImageIcon("C:\\Users\\Emre\\Desktop\\Untitled.png"));
        label_2.setBounds(223, 58, 38, 43);
        contentPane.add(label_2);

        JLabel label_3 = new JLabel(" ");
        label_3.setIcon(new ImageIcon("C:\\Users\\Emre\\Desktop\\Untitled.png"));
        label_3.setBounds(261, 58, 38, 43);
        contentPane.add(label_3);

        JLabel label_4 = new JLabel(" ");
        label_4.setIcon(new ImageIcon("C:\\Users\\Emre\\Desktop\\Untitled.png"));
        label_4.setBounds(299, 58, 38, 43);
        contentPane.add(label_4);

        JLabel label_5 = new JLabel(" ");
        label_5.setIcon(new ImageIcon("C:\\Users\\Emre\\Desktop\\Untitled.png"));
        label_5.setBounds(337, 58, 38, 43);
        contentPane.add(label_5);

        JLabel lblNewLabel_2 = new JLabel(" ");
        lblNewLabel_2.setIcon(new ImageIcon("C:\\Users\\Emre\\Desktop\\cccccccccc.png"));
        lblNewLabel_2.setBounds(71, 97, 304, 20);
        contentPane.add(lblNewLabel_2);

        JLabel label_6 = new JLabel(" ");
        label_6.setIcon(new ImageIcon("C:\\Users\\Emre\\Desktop\\Untitled.png"));
        label_6.setBounds(71, 112, 38, 43);
        contentPane.add(label_6);

        JLabel label_7 = new JLabel(" ");
        label_7.setIcon(new ImageIcon("C:\\Users\\Emre\\Desktop\\Untitled.png"));
        label_7.setBounds(109, 112, 38, 43);
        contentPane.add(label_7);

        JLabel label_8 = new JLabel(" ");
        label_8.setIcon(new ImageIcon("C:\\Users\\Emre\\Desktop\\Untitled.png"));
        label_8.setBounds(147, 112, 38, 43);
        contentPane.add(label_8);

        JLabel label_9 = new JLabel(" ");
        label_9.setIcon(new ImageIcon("C:\\Users\\Emre\\Desktop\\Untitled.png"));
        label_9.setBounds(185, 112, 38, 43);
        contentPane.add(label_9);

        JLabel label_10 = new JLabel(" ");
        label_10.setIcon(new ImageIcon("C:\\Users\\Emre\\Desktop\\Untitled.png"));
        label_10.setBounds(223, 112, 38, 43);
        contentPane.add(label_10);

        JLabel label_11 = new JLabel(" ");
        label_11.setIcon(new ImageIcon("C:\\Users\\Emre\\Desktop\\Untitled.png"));
        label_11.setBounds(261, 112, 38, 43);
        contentPane.add(label_11);

        JLabel label_12 = new JLabel(" ");
        label_12.setIcon(new ImageIcon("C:\\Users\\Emre\\Desktop\\Untitled.png"));
        label_12.setBounds(299, 112, 38, 43);
        contentPane.add(label_12);

        JLabel label_13 = new JLabel(" ");
        label_13.setIcon(new ImageIcon("C:\\Users\\Emre\\Desktop\\Untitled.png"));
        label_13.setBounds(337, 112, 38, 43);
        contentPane.add(label_13);

        JLabel lblNewLabel_3 = new JLabel("");
        lblNewLabel_3.setIcon(new ImageIcon("C:\\Users\\Emre\\Desktop\\adsd.png"));
        lblNewLabel_3.setBounds(63, 40, 312, 26);
        contentPane.add(lblNewLabel_3);

        JLabel lblNewLabel_4 = new JLabel("");
        lblNewLabel_4.setIcon(new ImageIcon("C:\\Users\\Emre\\Desktop\\seats\\empty.png"));
        lblNewLabel_4.setBounds(81, 163, 46, 43);
        contentPane.add(lblNewLabel_4);

        JLabel label_15 = new JLabel("");
        label_15.setIcon(new ImageIcon("C:\\Users\\Emre\\Desktop\\seats\\selected.png"));
        label_15.setBounds(164, 166, 46, 43);
        contentPane.add(label_15);

        JLabel lblNewLabel_5 = new JLabel("");
        lblNewLabel_5.setIcon(new ImageIcon("C:\\Users\\Emre\\Desktop\\seats\\booked.png"));
        lblNewLabel_5.setBounds(254, 163, 46, 43);
        contentPane.add(lblNewLabel_5);

        JLabel lblSelected = new JLabel("Selected");
        lblSelected.setBounds(202, 176, 57, 14);
        contentPane.add(lblSelected);

        JLabel lblBooked = new JLabel("Booked");
        lblBooked.setBounds(292, 176, 46, 14);
        contentPane.add(lblBooked);

        JLabel lblEmpty = new JLabel("Empty");
        lblEmpty.setBounds(118, 176, 46, 14);
        contentPane.add(lblEmpty);

        JButton btnContinue = new JButton("Next");
        btnContinue.setBounds(359, 227, 62, 23);
        contentPane.add(btnContinue);

        btnContinue.addMouseListener(new MouseAdapter() {
            public void mouseClicked(MouseEvent arg0) {
                data page = new data();
                page.setVisible(true);
                setVisible(false);
            }
        });
    }

    public seat() {
        // TODO Auto-generated constructor stub
    }

}
  • 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-06-01T15:20:07+00:00Added an answer on June 1, 2026 at 3:20 pm

    Instead of calling the standard constructor with

    seat frame = new seat();
    

    you have to call it with

    seat frame = new seat("from", "to", "time", "date");
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using C++/CLI, How to display a managed control (eg. System::Windows::Forms::Panel^) on a window created
I have created a process using proc-open but under windows the stream-select does not
i'm using eclipse platform and window builder pro within. I've already created new project
I'm using Visual Studio 2008, Developing an OpenGL window. I've created several classes for
I'm using CreateWindowEx() function to create an EDIT window, i.e. where a user can
I have created a taskbar using tabcontrols which works similarly to the Windows taskbar.
I have created a GUI in Java using swings with the help of Netbeans
I have created a small application using Microsoft .NET. I don't have problems with
How i can find all the windows created by a particular process using c#?
I'm using Lightwindow v2 in a Symfony project to create a modal window (

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.