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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T14:19:55+00:00 2026-05-27T14:19:55+00:00

I am making a small JFrame in which I draw a large triangle. On

  • 0

I am making a small JFrame in which I draw a large triangle. On all the sides of the triangle there has to be a label. I have to position these labels myself, because of the irregular shape of the triangle (yes, there will also be a non-right-angled triangle). (I have specified setResizable(false) on my JFrame, so there is no need for multiple sizes.)

Would there be any way to manually set the location of all my labels, WITH a layout manager?

Program design

  • 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-27T14:19:55+00:00Added an answer on May 27, 2026 at 2:19 pm

    You say that you want to draw the labels at irregular places e.g. at corners and at the sides the dhapes. Then I would recommend to use drawString(String s, int x, int y) in the Graphics2D API. So place the labels and draw then when you draw the figure.

    See Lesson: Working with Text APIs for more advanced options like e.g. Fonts and Font metrics.

    When you want to specify the exact position of labels, is the only case when you shouldn’t use an Layout Manager.

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

Sidebar

Related Questions

Making a small WCF test program which is based on a Store that has
I'm making a small web application in Seaside. I have a login component, and
I am going to be making a small user system but I have questions.
I'm making a small game for a school project, and basically there are 20
I'm making a small Python program, which calls the webbrowser module to open a
I'm making a small app in Adobe Air which I need to interact with
I am making the small finance management website in php. I have to store
I am making an small application in android in which i used an image
I am making a small Windows Phone 7 application and have lots of text
I am making small bubble words game where there will be many bubble(Imageview) on

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.