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


Groups > comp.lang.java.programmer > #37357

Re: how to convert html?

From Knute Johnson <nospam@rabbitbrush.frazmtn.com>
Newsgroups comp.lang.java.programmer
Subject Re: how to convert html?
Date 2017-08-30 10:59 -0500
Organization A noiseless patient Spider
Message-ID <oo6n5i$i41$1@dont-email.me> (permalink)
References <1d4eecd0-a437-4541-841a-4cba7fef7380@googlegroups.com>

Show all headers | View raw


On 8/30/2017 09:03, Eric Douglas wrote:
> I am generating a printout from a GUI screen.  Now I want to see if I can somehow incorporate the tooltips.
> I can call setToolTipText on my components and the Java somehow converts this.  Text may be "tool tip text" or may be "<html>line one<br/>line two</html>".
> I can't see where it converts it but it does display the html text simply as 2 lines of plain text.
> I tried searching for how to make my tooltips into printable text as you see on the screen and can't find anything easy, so I'm either hard coding to parse out the html strings, or including a third party html jar to run it through like JTidy or JSoup.  Somehow this is built into tooltips, so there has to be an easier way.
> 

I didn't come up with any good solution to what I think you want to do 
but you could create a new JToolTip (with your html text), display that 
in some container and print it.  I don't know how to get a hold of the 
default tool tip on a JComponent.  What would be cool is if there was a 
way to trigger all of the tool tips in an application at once.

-- 

Knute Johnson

Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

how to convert html? Eric Douglas <e.d.programmer@gmail.com> - 2017-08-30 07:03 -0700
  Re: how to convert html? Knute Johnson <nospam@rabbitbrush.frazmtn.com> - 2017-08-30 10:59 -0500
    Re: how to convert html? Eric Douglas <e.d.programmer@gmail.com> - 2017-08-30 11:41 -0700
      Re: how to convert html? Knute Johnson <nospam@rabbitbrush.frazmtn.com> - 2017-08-30 14:52 -0500
        Re: how to convert html? Eric Douglas <e.d.programmer@gmail.com> - 2017-08-30 14:00 -0700
          Re: how to convert html? Eric Douglas <e.d.programmer@gmail.com> - 2017-08-31 05:47 -0700
            Re: how to convert html? Eric Douglas <e.d.programmer@gmail.com> - 2017-08-31 05:56 -0700
              Re: how to convert html? Eric Douglas <e.d.programmer@gmail.com> - 2017-08-31 07:12 -0700
                Re: how to convert html? Knute Johnson <nospam@rabbitbrush.frazmtn.com> - 2017-08-31 13:20 -0500
                Re: how to convert html? Eric Douglas <e.d.programmer@gmail.com> - 2017-08-31 11:49 -0700
                Re: how to convert html? Knute Johnson <nospam@rabbitbrush.frazmtn.com> - 2017-08-31 14:52 -0500
                Re: how to convert html? Eric Douglas <e.d.programmer@gmail.com> - 2017-08-31 13:37 -0700

csiph-web