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

  • Home
  • SEARCH
  • 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 6025425
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T04:17:57+00:00 2026-05-23T04:17:57+00:00

I have a JEditorPane in a JPanel. I want to know how far from

  • 0

I have a JEditorPane in a JPanel. I want to know how far from the left and the right the JEditorPane is from the edge of the JPanel (or the frame as they are the same).

Is there a way to do this?

The Reason Is: I want to put a gradient on the JEditorPane that aligns to the edge of the JPanel in stead of the JEditorPane. The reason I want to do this is because there is a gradient on the JPanel and I don’t want the JEditorPane background to appear to cover up the gradient. I would set the background to transparent but I got screen paint issues that I was unable to resolve.

  • 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-23T04:17:58+00:00Added an answer on May 23, 2026 at 4:17 am

    Just call getLocation on your JEditorPane. The location of a Component is relative to its parent.

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

Sidebar

Related Questions

Suppose I have a JEditorPane in a JPanel. I want to be able to
I want to have a JEditorPane inside a JScrollPane. When the user clicks a
I'm wondering if there's a way to have tabs convert to spaces in a
I have an JEditorPane where in some HTML documents are loaded. I want to
I have a JEditorPane created by this way: JEditorPane pane = new JEditorPane(text/html, <font
have span that may or may not have text content. is there a way
I am creating a XMl editor. I want the JeditorPane to have expand collapse
I have few links displayed in JEditorPane ex: http://www.google.com/finance?q=NYSE:C http://www.google.com/finance?q=NASDAQ:MSFT I want that I
I have a JeditorPane which has some text in HTML format. When I execute
I have a simple JEditorPane inside a JScrollPane that displays line numbers on 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.