Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #20362 > unrolled thread

Text in JEditorPane with links to actions

Started byH.L@softhome.net (HawkLane)
First post2012-12-15 19:02 +0000
Last post2012-12-24 12:01 +0000
Articles 4 — 3 participants

Back to article view | Back to comp.lang.java.programmer


Contents

  Text in JEditorPane with links to actions H.L@softhome.net (HawkLane) - 2012-12-15 19:02 +0000
    Re: Text in JEditorPane with links to actions markspace <-@.> - 2012-12-15 14:06 -0800
    Re: Text in JEditorPane with links to actions Roedy Green <see_website@mindprod.com.invalid> - 2012-12-15 16:40 -0800
      Re: Text in JEditorPane with links to actions H.L@softhome.net (HawkLane) - 2012-12-24 12:01 +0000

#20362 — Text in JEditorPane with links to actions

FromH.L@softhome.net (HawkLane)
Date2012-12-15 19:02 +0000
SubjectText in JEditorPane with links to actions
Message-ID<b1fb47964e54624ed7794ad833a1d882$1@homeunix.nl>
 My boss wants us to have like a help document in a Swing application. 
This means that if the user clicks on a special term (underlined), the 
"help text" (explanation of the term) is shown, whether in a pop-up window 
or something else. Is the best way to do this using a HyperlinkListener or 
something else?

 

[toc] | [next] | [standalone]


#20367

Frommarkspace <-@.>
Date2012-12-15 14:06 -0800
Message-ID<kais9h$df1$1@dont-email.me>
In reply to#20362
On 12/15/2012 11:02 AM, HawkLane wrote:
>
> My boss wants us to have like a help document in a Swing application.
> This means that if the user clicks on a special term (underlined), the
> "help text" (explanation of the term) is shown, whether in a pop-up
> window or something else. Is the best way to do this using a
> HyperlinkListener or something else?
>

I see JavaFx links are being added to the Java tutorial, by Oracle.  I 
think you'd be remiss to not think about JavaFX.  Here's the link from 
the tutorial:

<http://docs.oracle.com/javafx/2/ui_controls/editor.htm>

However my personal experience is "I dunno."  In general you do use 
HyperlinkListener to implement links with a JEditorPane.  Whether that's 
a good idea for "help text" is beyond my ken.

You should probably also have a look at JavaHelp if you stick to Swing. 
  However I've seen some people claim it's too complicated for what it 
does.  Rolling your own help in Java seems a popular option.

<http://javahelp.java.net/>


[toc] | [prev] | [next] | [standalone]


#20369

FromRoedy Green <see_website@mindprod.com.invalid>
Date2012-12-15 16:40 -0800
Message-ID<u16qc85uhgu6to17d8t2koccdu9g9ra8ga@4ax.com>
In reply to#20362
On 15 Dec 2012 19:02:45 GMT, H.L@softhome.net (HawkLane) wrote, quoted
or indirectly quoted someone who said :

> My boss wants us to have like a help document in a Swing application. 
>This means that if the user clicks on a special term (underlined), the 
>"help text" (explanation of the term) is shown, whether in a pop-up window 
>or something else. Is the best way to do this using a HyperlinkListener or 
>something else?

Fill it full of stylised, perfect, simplified HTML. Then you can get
notified when someone clicks on something.
-- 
Roedy Green Canadian Mind Products http://mindprod.com
Students who hire or con others to do their homework are as foolish 
as couch potatoes who hire others to go to the gym for them. 

[toc] | [prev] | [next] | [standalone]


#20693

FromH.L@softhome.net (HawkLane)
Date2012-12-24 12:01 +0000
Message-ID<a239143a4062b0c5009fb540b23de151$1@homeunix.nl>
In reply to#20369
 Thank you for your help very nice. This works, but we want the use to be 
able to switch from editable to non-editable (system will find what words 
should be underlined). 

 When I go to the editable state, the text that I type after the linked 
word is also with href formatting, i.e. blue and underlined, how can I 
make it plain again instead?

 

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.java.programmer


csiph-web