How can I use two different ToolTipUIs?

Hi,
I want to use two different ToolTipUIs depending (in my case) on the JRadioButton that the Cursor is hovering over. For some JRadioButtons, I want to use the default ToolTipUI, and for others I wish to display a large amount of text over multiple lines. It seems to me that this is not easily possible as ToolTipManager uses the same JTooltip for each component, so setting the UI for JToolTip will affect every tool-tip-text.
Does anyone know of a simple method to achieve this goal? Or can someone please correct me if my understanding is wrong?!
And yes, I do realise that I could just use the multi-line ToolTipUI for all tooltips.
Thanks,
Muel.

As a point of interest, does anyone know why JToolTip doesn't have a public setUI(ComponentUI) method? Most other JComponents have such a method. This is really annoying because it means you have to do 1 of 2 things:
1. Subclass JToolTip and subclass the particular JComponent
public class WrappableToolTip extends JToolTip {
     public void setUI(ComponentUI ui) {
          super.setUI(ui);
} //end class
// and the subclass of the JComponent
public class WrapToolTipRadioButton extends JRadioButton {
     public WrapToolTipRadioButton(String text) {
          super(text);
     public JToolTip createToolTip() {
          JToolTip toolTip = new WrappableToolTip();
          toolTip.setComponent(this);
          toolTip.setUI(new WrappableToolTipUI());
          return toolTip;
} //end class
2. Rank work around in particular JComponent
public class WrapToolTipRadioButton extends JRadioButton {
     public WrapToolTipRadioButton(String text) {
          super(text);
     public JToolTip createToolTip() {
          JToolTip toolTip = super.createToolTip();
          ComponentUI oldUI = UIManager.getUI(toolTip);
          UIManager.put("ToolTipUI", WrappableToolTipUI.class.getName());
          toolTip.updateUI();
          UIManager.put("ToolTipUI", oldUI.getClass().getName());
          return toolTip;
} //end classThis problem is really annoying, because I have to write 2 or 3 (depending on above methods) classes for something simple. If it were a different component, I'd just have to write 1 class - the UI class. Irritating!

Similar Messages

  • How Can i Use two Different Public IP Addresses no my DMZ with ASA Firewall.

    How To Using Two Different Public IP Address on My DMZ with ASA 5520
    Postado por jorge decimo decimo em 28/Jan/2013 5:51:28
    Hi everyone out there.
    can any one please help me regarding this situation that im looking for a solution
    My old range of public ip address are finished, i mean (the 41.x.x.0 range)
    So now i still need to have in my DMZ another two servers that will bring some new services.
    Remember that those two server, will need to be accessable both from inside and from outside users (Internet users) as well.
    So as i said, my old range of public ip address is finished and we asked the ISP to gives some additional public
    ip address to address the need of the two new servers on DMZ. and the ISP gave us the range of 197.216.1.24/29
    So my quation is, on reall time world (on the equipment) how can i Use two different public ip address on the same DMZ
    on Cisco ASA 5520 v8??
    How my configuration should look like?
    I was told about implementing static nat with Sub Interfaces on both Router and ASA interface
    Can someone please do give me a help with a practical config sample please. i can as well be reached at [email protected]
    attached is my network diagram for a better understanding
    I thank every body in advance
    Jorge

    Hi,
    So looking at your picture you have the original public IP address range configured on the OUTSIDE and its used for NAT for different servers behind the ASA firewall.
    Now you have gotten a new public IP address range from the ISP and want to get it into use.
    How do you want to use this IP address range? You want to configure the public IP addresses directly on the servers or NAT them at the ASA and have private IP addresses on the actual servers (like it seems to be for the current server)?
    To get the routing working naturally the only thing needed between your Router and Firewall would be to have a static route for the new public network range pointing towards your ASA OUTSIDE IP address. The routing between your Router and the ISP core could either be handled with Static Routing or Dynamic Routing.
    So you dont really need to change the interface configuration between the Router and ASA at all. You just need a Static route pointing the new public IP address towards the ASA outside IP address.
    Now when the routing is handled between the ISP - ISP/Your Router - Your Firewall, you can then consider how to use those IP addresses.
    Do you want to use the public IP addresses DIRECTLY on the HOSTS behind the firewall?This would require you to either configure a new physical interface with the new public IP address range OR create a new subinterface with the new public IP addresses range AND then configure the LAN devices correspondingly to the chosen method on the firewall
    Do you want to use the public IP addresses DIRECLTY on the ASA OUTSIDE as NAT IP addresses?This would require for you to only start configuring Static NAT for the new servers between the inside/dmz and outside interface of the ASA. The format would be no different from the previous NAT configuration other than for the different IP addresses ofcourse
    Of the above ways
    The first way is good because the actual hosts will have the public IP addresses. Therefore you wont run into problems with DNS when the LAN users are trying to access the server.
    The second way is the one requiring the least amount of configurations/changes on the ASA. In this case though you might run into problem with DNS (to which I refer above) as the server actually has a private IP address but the public DNS might reply to the LAN hosts with a public IP address and therefore connections from LAN could fail. This is because LAN users cant connect to the servers OUTSIDE NAT IP address (unless you NAT the server to public IP address towards LAN also)
    Hopefully the above was helpfull. Naturally ask more specific questions and I'll answer them. Hopefully I didnt miss something. But please ask more
    I'm currently at Cisco Live! 2013 London so in the "worst case" I might be able to answer on the weekend at earliest.
    - Jouni

  • How can I use two differant iphones on one itunes

    I can i use two differant iphones on one itunes, and keep the content seperate?

    You can sync as many iphones/ipod/ipads as you like to one computer.
    Each is different and is recognized as such

  • How can I use two different Yahoo mail accounts ion Firefox?

    I have two Yahoo mail IDs. How can I use them both simultaneously on Firefox? Right now I am running Firefox and Internet Explorer so I can have the two accounts open at the same time. I would prefer to have both accounts running on Firefox, but I can't figure out how to do it.

    Multifox is an extension that allows Firefox to connect to websites using different user names. Simultaneously! <br />
    http://br.mozdev.org/multifox/

  • How can portal use two different LDAP Server in UME

    Hi,
    My question is Can UME in portal be configured for multiple LDAP sources.Currently i have a setting in portal
    as follows:
    Server Name : Abcd
    port : 1234
    user : CN=" ",Ou=" ",Ou=" ",Dc=AD,Dc=my company,Dc=com
    password :
    user path : DC=AD,Dc=My company,Dc=Com
    group Path : same as user path
    I want to configure one more LDAP server to my portal UME,how can give values for that in above sttings.I even want these current settings to be enabled.
    Do anyone have idea on this.
    Thanks and Regards
    Rani A

    Hi again ,
    I know it can be done. But how urgent is this for you.
    I can get back to you in couple of days, me lil busy today.
    cheers,
    Anu...

  • How can I use two different PC's with Lr5.5 to manage and process my photos stored on external disk, and exchange the analysis between these two computers?

    I operate on two computers and would like to be able download  Lr jobs done on my laptop,  to my stationary PC, also used to process other images, all stored on the same external disk.
    In other words I want to process may photos on two PCs and to to have access to all analyses from one or even better from both computers independently.
    Samek.

    You need to put your photos AND LR catalog file (.lrcat) on the external drive, and make sure the external drive has the same device name or drive letter on both computers.
    I have been using LR this way for several years and it works fine as long as you MAKE A BACKUP of the external disk somewhere, in case you lose or drop/damage the external drive which is easy to do.  Nightly, or sometimes more than once a day, I copy all changes from my working external disk to another similar-sized external disk.  I have lost a disk, once, and dropped/destroyed a disk, once, but recovery is as easy as using what used to be the backup disk as the primary one, and buying a new disk for the backup device.  It does take some hours to copy the 1TB of photos to the new backup disk, but once that is done, it usually only takes a few 10s of minutes or less to copy what is new or changed each night.

  • How can I use two different page orientations in the same document?

    I am trying to have both portrait and landscape page orientations in the same document.  Pages doesn't seem to like this.  Is there a way?

    I tried to comment on another thread about this same issue, but the thread was closed.
    In the other thread; however, some asked why rotating one pages was necessary, and if they knew then maybe there would be reason to create the function.
    Well, I don't know about why anyone else needs it, but for me it's for the papers I have to write for my masters program. The professors like to have the rubric attached to the bottome of the document so they easily grade and keep things organized. They of course give directions on how to easily change the orientation of the last page in Word, but not all of use Word, or even want to use Word. Maybe I need to ditch Pages and go to Word? I'd really hate to do that!
    So, come on Apple, let's get this feature added, stat!

  • How can I use two different wireless home phone terminals, different locations, one at a time same phone number

    I have two locations and want to have a wireless home phone at each location with the same home phone number. Only one terminal will be used at a time.

    That's not what a cell phone is.
    You are talking about some kind of a separate communication system.  Like a walkie talkie or something that works over broadcast.  IP phones may be able to do something like that but you would somehow have to register the system to a single cell phone number, which wont work without a SIM card.

  • HT204053 How can I sync two different email accounts?

    How can I sync two different email accounts? All of this Mobile Me and cloud stuff got me all flustered and now I have two accounts possibly 3.

    How to use multiple iPods, iPads, or iPhones with one computer

  • How can i use 2 different apple ids for imessage and facetime on 1 ipad?

    How can i use 2 different apple ids for imessage and facetime on 1 ipad?

    Do you mean can you use one Apple ID for FaceTime and one for iMessage? You should be able to. Or, do you mean, can you log into iMessage (or FaceTime) with two Apple IDs at once? No.

  • How can i sync two different ipods to one computer

    How can i sync two different ipods to one computer

    How to use multiple iPods, iPads, or iPhones with one computer

  • HT204053 If I have set up my Mac with two different users,  can I use two different Apple IDs on the same Mac?

    If I have set up my Mac with two different users,  can I use two different Apple IDs on the same Mac?

    Each user account may have its own Apple ID.

  • Can I use two different devices with different apple ID for backing up data on one machine without losing any data that was backed up with one device earlier?

    Can I use two different devices with different apple ID for backing up data on one machine without losing any data that was backed up with one device earlier?

    The link is to a discussion started on 12/18 in the FiOS Internet forum.  Here's the link I get now, however it is different than the link I pulled a few hours ago.  If this system changes the link again, it may not work.
    http://forums.verizon.com/t5/FiOS-Internet/Frustration-and-just-confused-with-internet-help-please/t...
    You can also look for the topic, "frustration and just confused" in the FiOS Internet forum.
    Here's a link that is in the thread that gives more detail.
    https://secure.dslreports.com/faq/15984
    Good Luck!
    P.S.  "Copper Contributor" is my "rank."  gs0b is my user name.
    If a forum member gives an answer you like, give them the Kudos they deserve. If a member gives you the answer to your question, mark the answer as Accepted Solution so others can see the solution to the problem.

  • Can I use two different itune accounts on one computer?

    Can I use two different itune accounts on one computer?

    1. Give her a separate user account on your computer. If you have a backup copy of the library, you can restore it.
    2. If you encounter a 90-day waiting period, click here and ask the iTunes Store staff if they'll remove it.
    (125941)

  • How can I use a different Apple ID withthe App Store?

    When I access the App Store from my iPhone 3G it asks me to enter the password for an Apple ID.
    How can I use a different Apple ID with the App Store?

    It will use the account you are currently signed into with iTunes when you synced. So in iTunes, change your account, then sync. Then the iPhone will use that one.

Maybe you are looking for

  • Grouping field value in the additional data tab is saved with capital lette

    Hi, Whenever I change the value in the 'Grouping field' in the additional data tab, it gets saved with all letter caps. For e.g, if i enter 'Manager'.. it gets saved as 'MANAGER'. what could be the reason for this? Is there any configuration for this

  • Slide Show from Fotomagico to .mov to DVD using iDVD 08

    I used to make slide shows using analogue equipment (multiple slide projectors and electronic controlled slide changes involving fading and timing). These slideshows were projected onto a large screen (2m * 2m). With the introduction of large high de

  • Idoc errors

    Ever since the implementation of the release procedure, a non-reproducible error sporadically occurred in IDOCs from type ORDERS. However, we are not sure that this procedure is the reason for the error. Error: The WE is missing at the item level. (A

  • Display is Messed Up

    I don't know how it happened, but my iphone's display is in negative colors, and I don't see anywhere I can fix it. Has this happened to anyone?

  • How can I view iTunes charges without having iTunes?

    How can I view iTunes charges without having iTunes? Unless you have iTunes installed. I cannot find a way to see details about charges to my account. I understand that a confirmation email is sent after each charge, but unfortunately I delete those.