How set location for tooltip text ??

hi ,
i want to set tooltip location myself to a button . for this i override methods are
1. public String getToolTipText(MouseEvent e)2 public Point getToolTipLocation(MouseEvent e)here is code... where i have to change to set location for tooltip
* DebugGraphicsTest.java
* Created on April 28, 2005, 1:14 AM
package swingtest;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
* @author  Paramasivam
public class DebugGraphicsTest extends javax.swing.JFrame {
    public DebugGraphicsTest() {
        initComponents();
        MyButton  btn = new MyButton("Chem m e");
        btn.setToolTipText("this is actual");
        getContentPane().add(btn);
        jButton1.setToolTipText("button 1");
        jButton2.setToolTipText("button 2");
        jButton3.setToolTipText("button 3");
    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
    private void initComponents() {
        jPanel1 = new javax.swing.JPanel();
        jButton1 = new javax.swing.JButton();
        jButton2 = new javax.swing.JButton();
        jButton3 = new javax.swing.JButton();
        getContentPane().setLayout(new java.awt.FlowLayout());
        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        jButton1.setText("jButton1");
        jPanel1.add(jButton1);
        jButton2.setText("jButton2");
        jPanel1.add(jButton2);
        jButton3.setText("jButton3");
        jPanel1.add(jButton3);
        getContentPane().add(jPanel1);
        pack();
     * @param args the command line arguments
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new DebugGraphicsTest().setVisible(true);
    // Variables declaration - do not modify
    private javax.swing.JButton jButton1;
    private javax.swing.JButton jButton2;
    private javax.swing.JButton jButton3;
    private javax.swing.JPanel jPanel1;
    // End of variables declaration
class MyButton  extends JButton{
    public MyButton(String s){
        super(s);
    public Point getToolTipLocation(MouseEvent evnt){
        return new Point(100,300);
    public String getToolTipText(){
        return "hihi";
    public String getToolTipText(MouseEvent me){
        return "event hihi";
}

Adding the line ToolTipManager.sharedInstance().registerComponent(this); to MyButton's constructor seems to solve the problem.

Similar Messages

  • InDesign CS6 how to set justification for form text field?

    Hi everyone,
    I've been playing with the ability to create form for PDF file but I haven't figure out how to set a center justification for a text field.  By default it's left.  Same thing for font, the one selected in InDesign while creating the form isn't used when editing the form in Acrobat.
    Do I need to create a paragraph style with a specific name to preserve both attributes?
    Thanks.

    InDesign CS6's forms features are great, but you're looking as version 1.0 of the feature. Those features cannot be set in InDesign.
    Furthermore, if you try to pick a font other than the standard ones at the top of the menu, don't expect that your form users will be able to pick those fonts when they open up the form in Reader or Acrobat. I'm pretty sure that custom fonts are not stored in the PDF form.

  • How set color for a ValidationTextField's hint?

    I want to set color for a ValidationTextField's hint, to
    implement watermark effect, how do it?

    Hi...
    The below code is working fine for me...
    <%@page language="abap" %>
    <%@extension name="htmlb" prefix="htmlb" %>
    <htmlb:content design="design2003" >
      <htmlb:page title="stg " >
        <htmlb:form>
          <htmlb:tabStrip width      = "430"
                          bodyColor  = "rgb(88,5,64)"
                          id         = "t1"
                          bodyHeight = "112" >
            <htmlb:tabStripItem id      = "t1"
                                index   = "1"
                                title   = "Sales"
                                tooltip = "My Tooltip for Tab 1" >
              <htmlb:textView text="Tab N 1" />
              <htmlb:tree id        = "treeReports"
                          showTitle = "true"
                          table2    = "<%= mt_nodes %>"
                          title     = "Menu"
                          width     = "100%" />
            </htmlb:tabStripItem>
            <htmlb:tabStripItem id      = "t2"
                                index   = "2"
                                title   = "Production"
                                tooltip = "My Tooltip for Tab 2" >
              <htmlb:textView text="Tab N 2" />
            </htmlb:tabStripItem>
          </htmlb:tabStrip>
        </htmlb:form>
      </htmlb:page>
    </htmlb:content>

  • How to search for a text string in Reports designer?

    In iDS reports (10gR2), I want to search from top down for a text string was used in one of the queries or triggers. In Forms, you can do it, in reports the related menu item is always seems to be grayed out no matter what item I pick in the Navigator. Is it doable or not? If yes, then how. I don't wanna open each program piece including the queries in the data model, report triggers or program units and look for (by visual scanning) for the text I am searching for. This is crazy. There must be a way to do it. Thanx.

    That is pretty bad for such an expensive report development program. The forms allows it, I wonder why Oracle did not include similar functionality in the reports developer. I knew the conversion to ascii, but during development it is pain in the ... just to search for a simple text string in the related program units in the report, to convert to ascii, do the search and then go back to the developer. Anyway, if that is the only way, there is nothing we can do I guess :(

  • How To Search For a Text In JTable Column?

    hi there
    i want to search for specific text in a JTable Column
    And If The Text Exists Highlits it?
    any ideas or useful links or tutorials?

    Well, then that would be a Swing related question. Did you search the Swing forum to see how rendering works.

  • How to give for a text field 'max+1' value instead of sequence .

    HI All,
    I have a requirement like ,
    For my text field i applied sequence by using groovy expression.Now i need to change that to 'max+' value of table Grid and display in the text field. Can please suggest me how can i implement .(JDev 11.1.1.3 v)
    Regards,
    Sindhu.

    hi user,
    if you want perform some increment operation . in auto means. donot prefer these thread given below..
    there is lot thread of for creating sequence. based on the sequence it works perfect.
    if i understud correctly means follow this
    Increment operation // it perfoms some increment operation. not using sequennce.
    button press
    compliation problem // have a look at this
    if cumes under cirumstance for multiple user on that scree or ui . probabaly this idea(max)or (some increment) will fails.
    i i will prefer sequqnecs._
    IN ADDITION INFO TO USER
    JOHN SAYIGN EXACTLY
    Edited by: Erp on Sep 25, 2011 9:46 PM

  • Set Location of individual text box - report design

    Post Author: sonjeeva
    CA Forum: Crystal Reports
    Hi Guys,
    Is it possible to set location of an individaul text box to be at the end of report? I know if I have this at end of report area it would work. But my report has a sub report in end of report area and the text box doesn't appear at the end of both reports.
    Cheers
    Sonny

    Post Author: kcheeb
    CA Forum: Crystal Reports
    If you are creating the report through code (C#, VB etc.) you could get the location/size of the subreport and then set the text box location based on those parameters.
    I don't think it's possible from within the Crystal report designer itself. At least I couldn't find a place to do this.

  • How set authorizations for sales reports and other reports in SAPB1

    Hi, I'm currently working in SAP Business One Version 8.82
    The issue I'm facing is that I want to set it up so that certain users cannot see other users' sales information.  I know that I can turn on or off the Sales Analysis Report for various users for instance, but what I really want specifically is this.  Suppose we have 3 different teams: Team A consists of (Angie, Angela, and Anita the manager), Team B consists of (Bob, Barbara, and Ben the manager), Team C consists of (Cat, Charlie, and Courtney the manager).  I would like to make it so that everyone can view the individual sales order documents of everyone else (in case a customer calls and needs information, but the salesperson who created that document isn't there); however, Angie should only see her own orders when she does a Sales Analysis while Anita, the manager of Team A, should see the the orders of Angie, Angela, and herself of course.
    To summarize, I'd like to see the following
    1.  Each salesperson can lookup and view any sales order.
    2.  Each salesperson can run an sales report to view all his/her own open sales orders.
    3.  Each manager can run a sales report on his/her subordinates, but not on the other managers or their subordinates.
    4.  The boss or other people working in corporate are able to run a report on all open sales orders.
    What's the best way to approach this?  Is it best if I create my own report?  I haven't created any reports from scratch yet, so I'm not sure exactly how that works.  I'd like to be able to group the salespeople up by location if possible.  The sales analysis report doesn't really do that, but it is useful.  I just don't want everyone to be able to see the numbers on their peers.
    Thank you I appreciate any help or advice.

    Hi,
    1.  Each salesperson can lookup and view any sales order.
    Answer:
    Create own report by using query and save under query manager and the assign for all group. So that all sales person can run this query  and can get sales order detail.
    2.  Each salesperson can run an sales report to view all his/her own open sales orders.
    Answer:
    Create individual query ( add condition in where clause slpname = 'XXX') for each sales person and save it under query manager and assign to particular user group
    3.  Each manager can run a sales report on his/her subordinates, but not on the other managers or their subordinates.
    Answer:
    Create query for only particular team (  condition is slpname = XXX OR YYY OR ZZZ) and save under query manager. Make schedule report on this and send it to only particular manger
    Same way create for another manager and schedule report.
    4.  The boss or other people working in corporate are able to run a report on all open sales orders
    Answer.
    Create query for all sales person and schedule report to big boss.
    Hope you can get an idea.
    Let me know if you need sales report ( advice required field)
    Thanks & Regards,
    Nagarajan

  • How to search for a text node with a particular value in an xml document with labview

    supposing i have the following xml document:
    <head>
    <book>
    <bookname>zio</bookname>
    <author>dan</author>
    </book>
    <book>
    <bookname>the spear warrior</bookname>
    <author>britney</author>
    </book>
    <book>
    <bookname>the beard</bookname>
    <author>derrick</author>
    </book>
    </head>
    i want to search for the author of the book "the beard" using for example the V.I Get first match  of labview to access the the node with value "the beard" and then use Get next sibling  V.I  and Get node text content to get get the author of this book..so my question is how do i write the xpath expression for Get first match so as to access the node with bookname "the beard" instantyly?  am trying to minimise the use of loops because they increase the time duration,..thank you (NB:i dont want to use Get all Matched V.I because it obliges me to use a loop in order to access the name derrick and this increases the time duration for my v.i)
    Solved!
    Go to Solution.

    Since it's all text, why not use a real quick Match Pattern (or Regular Expression, but you don't need that much power here), see attached.
    Cameron
    To err is human, but to really foul it up requires a computer.
    The optimist believes we are in the best of all possible worlds - the pessimist fears this is true.
    Profanity is the one language all programmers know best.
    An expert is someone who has made all the possible mistakes.
    To learn something about LabVIEW at no extra cost, work the online LabVIEW tutorial(s):
    LabVIEW Unit 1 - Getting Started
    Learn to Use LabVIEW with MyDAQ
    Attachments:
    Two-stage match demo.vi ‏8 KB

  • Setting Locations for IMovie 08 Files

    This seems rather basic. But, where do all these movies files get stored? If we are have a record of all movies, the movies will not normally fit on a single hard drive. i do not see anything in the preferences that allows me to set the movie location. Also, most movies will need to be stored on DVDs for the long term. Am I missing something?

    View > By Volume
    on the menu will show where all your movies are stored. I think you can then drag and drop movies from one volume to another (I haven't tried it yet).
    If you use finder to move a movie, it seems to have to redo the thumbnails (which takes hours for hours of footage).

  • Set location for the JLabel

    Hello!
    I've got an interesting effect and I don't have a list idea why it happens. I set layout to null in the panel and created some JLabels in this panel. Then I saved locations of the labels in a data base, exited from the window and tried to create the panel and labels again using information saved in the data base. All labels appeared in the panel but their locations were slightly different in spite of the coordinates were the same as befor. The top left corner of each label slightly displacemnts to the up and left. I used setLocation method in the JLabel and also tried to use setBound but result was the same.
    Does anybody know what the matter is?
    TIA

    you can use HelpBroker.setLocation and HelpBroker.setSize, but both are new methods introduced in JavaHelp 2.0 beta release only.

  • How set resultout for external java function

    Hi,
    i am working on workflow with java, any body know how to set resultout in java class in excute method (like return if that is custom look type) and my work flow making the status defferd even i am runing the background process.
    Thanks
    srinivas challa

    I am able add resultOut="T" but still status showing deffered only , please help

  • How set value for more than one variable using a single prompt

    There is a way to set more than one variable with a single prompt?
    e.g. set @CurrentYear and @PasteYear using just a single prompt for @CurrentYear.
    Some hint?
    Thanks
    Luc

    Using repository variables you can set like that.
    Check this link http://gerardnico.com/wiki/dat/obiee/set_variable
    If helps pls mark

  • Set location for offline-mode songs?

    In previous versions of Spotify, I had the option to choose where I wanted the offline-synced songs to bo, an option I can't find anymore. Is it possible to change it nowdays? 

    Hi Gribbled,
    Could you please change the SQL Server Service to run under 'LocalSystem' account and restart SQL Server? Then check if the error still occurs. When the SQL Server service account is configured to use the LocalSystem account, the server will automatically
    publish the SPN.
    Alternatively, to work around this issue, you can manually create the SPN for the SQL Server Service account  using the SETSPN tool. For more details, please review this
    blog.
    Thanks,
    Lydia Zhang

  • How set classpath for EJB

    My EJB will process xml file and I use Apache xml process jars. What should I do when archive and deploy the EAR so that my application can find the Apache Jars properly, currently the application always find the oracle xml process jars.

    you need not set any classpath to start the weblgic server, just go to start>programs... likethis y can start server
    you can set your classpath environment by
    setEnv.bat
    in bea/config directory

Maybe you are looking for

  • HP laserjet 1200 series pcl5 driver for windows 7 64bit and windows 8.1 64bit

    Dear I need HP laserjet 1200 series pcl5 driver for windows 7 64bit and windows 8.1 64bit can anyone provide me ? no links to read text, direct solution is welcomed thanks in all

  • AVL report - top of page event code ?

    Hi, I want to print TOP-OF_PAGE event code in ALV reprot. START-OF-SELECTION. Perform ALV_REPORT. TOP-OF-PAGE. PERFORM top_of_page. in the ALV function module(form alv_report) I have given like this. but its not printing any thing in top of ALV repor

  • Which one to use - Customer Interface or TCA APIs? And why?

    Hi, Please let me know the answer for the following questions. I have a legacy system in 11.0.3 (which does not have the TCA architecture) and the customers have to be moved to R12. I could get the details in different flat files for the import from

  • My mac mini doesn't shut down after installing mountain lion?

    Right after i installed mountain lion and checked all the new features, I closed all applications, clear ram, clear cache, clear print queue, made sure that nothing was running when i logged out(only one 1 user was logged on.) I shut down and it seem

  • HTC One M8 will not charge

    I have tried different chargers and the phone will not charge.  When I put it on the charger, I get a red flashing light and after 5 mins the light is gone and I cannot turn on the phone.  Now the phone has no charge and I am not able to do a factory