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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T02:56:30+00:00 2026-05-27T02:56:30+00:00

I am working with Netbeans GUI and I would like to add 3 pixels

  • 0

I am working with Netbeans GUI and I would like to add 3 pixels of space at the beginning of my jTextField :

enter image description here

I have tryied with setMargin, setInset in the GUI but it doesn’t change anything.

I have another question, why the bottom right border is not rounded ? here is my code :

Border roundedBorder = new LineBorder(new Color(210,210,210), 1, true);
researchTextField.setBorder(roundedBorder);

thank you very much,

Regards

  • 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-27T02:56:31+00:00Added an answer on May 27, 2026 at 2:56 am

    Using setMargin(...) should work.

    However, if you are also using a Border then that may be the problem.

    Try using a CompoundBorder where the inner border is an EmptyBorder() and the outer border is your other border. For example:

    Border rounded = new LineBorder(new Color(210,210,210), 1, true);
    Border empty = new EmptyBorder(0, 3, 0, 0);
    Border border = new CompoundBorder(rounded, empty);
    textField.setBorder(border);
    

    Read the section from the Swing tutorial on How to Use Borders for more information and examples.

    why the bottom right border is not rounded ?

    I’m not sure why your bottom/right is not rounded. Using the Metal LAF on XP the right borders (top and bottom) appear rounded but the left borders are not rounded. When I use a border size of 2 or more all corners appear equally rounded.

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

Sidebar

Related Questions

I have installed the latest version of netbeans and its working.. I have opened
I have created a JFrame form using netbeans GUI builder and place buttons on
I'm creating an application in Swing using NetBeans. I would like to be able
We've tools like Netbeans/Visual studio to do the GUI app for our project in
I'm very new to using Glassfish or JSP. I have this working in NetBeans
I'm working with the netbeans and I create a jar file, but it not
How can i add data to JTable while working with netbeans. Netbeans in it's
I was making a java gui application through netbeans IDE. All was working fine
I am working on a java gui application hard coding without any netbeans help.
I'm working on a TextMate like color scheme for NetBeans (twilight), I'm almost done,

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.