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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T01:40:33+00:00 2026-06-13T01:40:33+00:00

I have a word wrapping issue when using JTextPane. I think it’s my IDE

  • 0

I have a word wrapping issue when using JTextPane. I think it’s my IDE (JCreator) but when i use the source everyone else is using I get several errors. Sorry for the line breaks… Could it be my IDE or can someone please let me know the right way of doing this. TIA -Roland

The source I am using can be found at http://java-sl.com/tip_html_letter_wrap.html

lol.. I forgot the space! Thanks all. It is going to proceed. I have been programming all night and am a little groggy. Best of luck -Roland

> --------------------Configuration: inigui - JDK version <Default> - <Default>--------------------
> C:\ucdhb2\gaia\inigui\inigui2\src\inigui.java:283: error: ')' expected
>               gentextp.setEditorKit( newHTMLEditorKit(){ 
>                                                        ^ C:\ucdhb2\gaia\inigui\inigui2\src\inigui.java:285: error: ';' expected
>            public ViewFactory getViewFactory(){ 
>                                             ^ C:\ucdhb2\gaia\inigui\inigui2\src\inigui.java:330: error: illegal
> start of type
>         }); 
>          ^ C:\ucdhb2\gaia\inigui\inigui2\src\inigui.java:337: error: <identifier> expected
>         panel.setLayout(new GridLayout(1, 1));
>                        ^ C:\ucdhb2\gaia\inigui\inigui2\src\inigui.java:337: error: illegal
> start of type
>         panel.setLayout(new GridLayout(1, 1));
>                         ^ C:\ucdhb2\gaia\inigui\inigui2\src\inigui.java:337: error: ')' expected
>         panel.setLayout(new GridLayout(1, 1));
>                            ^ C:\ucdhb2\gaia\inigui\inigui2\src\inigui.java:337: error: ';' expected
>         panel.setLayout(new GridLayout(1, 1));
>                                       ^ C:\ucdhb2\gaia\inigui\inigui2\src\inigui.java:337: error: illegal
> start of type
>         panel.setLayout(new GridLayout(1, 1));
>                                        ^ C:\ucdhb2\gaia\inigui\inigui2\src\inigui.java:337: error: <identifier>
> expected
>         panel.setLayout(new GridLayout(1, 1));
>                                         ^ C:\ucdhb2\gaia\inigui\inigui2\src\inigui.java:337: error: ';' expected
>         panel.setLayout(new GridLayout(1, 1));
>                                          ^ C:\ucdhb2\gaia\inigui\inigui2\src\inigui.java:337: error: illegal
> start of type
>         panel.setLayout(new GridLayout(1, 1));
>                                            ^ C:\ucdhb2\gaia\inigui\inigui2\src\inigui.java:337: error: <identifier>
> expected
>         panel.setLayout(new GridLayout(1, 1));
>                                             ^ C:\ucdhb2\gaia\inigui\inigui2\src\inigui.java:339: error: illegal
> start of type
>         return panel;
>         ^ C:\ucdhb2\gaia\inigui\inigui2\src\inigui.java:339: error: ';' expected
>         return panel;
>               ^ C:\ucdhb2\gaia\inigui\inigui2\src\inigui.java:341: error: class, interface, or enum expected }  ^ 15 errors
  • 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-06-13T01:40:34+00:00Added an answer on June 13, 2026 at 1:40 am

    The linked code needs space chars in 3 places to compile.

    E.G.

    final JEditorPane htmlTextPane = newJEditorPane(); 
    

    should be:

    final JEditorPane htmlTextPane = new JEditorPane(); 
    

    Look at the line numbers identified by the compiler for the others.

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

Sidebar

Related Questions

I'm having an issue with word wrapping a Gridview. The source for the Gridview
I need to write a little ruby function that does word wrapping. I have
I have one WORD variable in my program. WORD hour; But when I compare
I have a word document with a bookmark. I use the bookmark to get
I am using c# to develop the function, I have a word document who
I have a tag with the text Click Here in it, the word wrapping
I am facing a problem in word-wrapping the text in using the suggested word-wrap:break-word
I have come to the conclusion HTML enabled JTextPanes do not support word wrapping.
I have a UILabel that is correctly word wrapping if I force its frame
I have a word document that was saved as xml. now I need to

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.