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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T22:32:57+00:00 2026-05-21T22:32:57+00:00

Hello I read about Layouts but didn’t get which one to use for my

  • 0

Hello
I read about Layouts but didn’t get which one to use for my application.
I want to add image to JPanel and place JLabel on op right corner just below the title bar.

I have written code for that but it is not working. JLabel is displayed at Centre.

My code is

// Below line adds image to Jpanel
 panel = new ImagePanel(backgroundImage);
 // I want to add below label to Jpanel
 JLabel jdesignNo=new JLabel(designNo);
 jdesignNo.setFont((new java.awt.Font("Times New Roman", 1, 30)));
 jdesignNo.setBounds(900, 100, 50, 30);
 jdesignNo.setBackground(Color.GREEN);
 panel.add(jdesignNo);
 frame.getContentPane().add(panel);
 frame.setVisible(true);

In above code i have set required location by setBound but it does not work.

How to solve this problem ?

Thanks !!!

  • 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-21T22:32:58+00:00Added an answer on May 21, 2026 at 10:32 pm

    Make sure you have

    panel.setLayout(null);
    

    if you wish to position the components yourself.

    But identifying and using a layout manager that would fit your needs would make things easier as the complexity of your application grows.

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

Sidebar

Related Questions

Hello every one I want to ask a question about file transfer using sockets.
Hello I made a SQL test and dubious/curious about one question: In which sequence
Hello fellow programmers, I am building a website and i read about sitemap.xml, but
I want to read a file (hello.in) and to write it to another file
Hello I've already read quite a bit about the CheckBox/ListView problems in Android. So
Hello I have read about jQuery ajax method, jQuery wraps some XMLHttpRequest inside. I
VB.NET 2010, .NET 4 Hello, I recently read about using SynchronizationContext objects to control
I was recently reading about the Arduino's Hello World application, and I thought to
Tried to read the official guide about embedding video on my website, but I
Hello is have a question for a school assignment i need to : Read

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.