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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T06:31:08+00:00 2026-05-30T06:31:08+00:00

Possible Duplicate: How do I write superscript word for checkbox text in java? So

  • 0

Possible Duplicate:
How do I write superscript word for checkbox text in java?

So I have this very simple program that basically consists of a GUI with a few text fields and a button.

The idea is that the user enters numbers into three fields and presses the button. Then what happens is a few mathematical procedures are carried out in the background, and the resuling answer is presented in a fourth text field.

Now, this does the job, but the formatting looks awful. At the very least, I would like to have part of the output superscripted. I have next to no experience with these things, but thought I would be able to get the hang of this on my own, but I’m stuck. I think I need to use AttributedString and possibly Font, but I can’t get anything to work. And I’ve found no tutorials.

Does anyone have any quick pointers? That’d be most helpful!

  • 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-30T06:31:09+00:00Added an answer on May 30, 2026 at 6:31 am

    Do you need the output field to be editable? If not, try using a JLabel with HTML code. Something like:

    jLabel4.setText("<html>ax<sup>2</sup>+bx+c</html>");
    

    You can add a border to that JLabel to make it look like a text field.

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

Sidebar

Related Questions

Possible Duplicate: Image comparison algorithm So basically i need to write a program that
Possible Duplicate: Java \ Pattern - how to write a pattern that verifies the
Possible Duplicate: How to write program during compiling? I found this problem on a
Possible Duplicate: How can I write a Java application that can update itself at
Possible Duplicate: Writing C# Plugin System Is it possible to write a program that
Possible Duplicate: How to write content on a text file using java? Is it
Possible Duplicate: byte[] array pattern search I am trying to write a simple compression
Possible Duplicate: Write a function that returns the longest palindrome in a given string
Possible Duplicate: Invalid read/write sometimes creates segmentation fault and sometimes does not I have
Possible Duplicate: Oracle DB: How can I write query ignoring case? I have an

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.