Results 1 to 4 of 4
  1. #1
    ravjot28 is offline Member
    Join Date
    Jun 2008
    Posts
    87
    Rep Power
    0

    Default Show Text with cursor

    Hi

    My problem is

    I want to show the button name whenever the user hover the mouse on that button as it is in normal windows so how can i do it please help

    Thanks in advance

  2. #2
    r035198x is offline Senior Member
    Join Date
    Aug 2009
    Posts
    2,388
    Rep Power
    8

    Default

    Did you try the setToolTipText method?

  3. #3
    ravjot28 is offline Member
    Join Date
    Jun 2008
    Posts
    87
    Rep Power
    0

    Default

    No but how can i do can u give me some snippet please

  4. #4
    Taiko is offline Member
    Join Date
    Jan 2010
    Location
    Opava, Czech Republic
    Posts
    14
    Rep Power
    0

    Default

    See: JComponent (Java 2 Platform SE v1.4.2)

    Use:
    Java Code:
    ...
    JButton myButton = new JButton();
    myButton.setText("Tralala");
    myButton.setToolTipText("Tralala. See?");
    ...
    :D;)

Similar Threads

  1. change the mouse cursor - crosshair cursor
    By cassysumandak in forum New To Java
    Replies: 1
    Last Post: 09-28-2009, 01:57 AM
  2. how to point cursor on the 1st text field in a jframe
    By VineetKumar in forum AWT / Swing
    Replies: 4
    Last Post: 04-17-2009, 02:58 PM
  3. Cursor
    By serfster in forum New To Java
    Replies: 2
    Last Post: 06-15-2008, 05:49 AM
  4. netbeans 6.0 not show commpunent or show blank page
    By fahimaamir in forum NetBeans
    Replies: 1
    Last Post: 01-26-2008, 06:20 AM
  5. Show Text Fields on combo Box selected value
    By smajidali26 in forum AWT / Swing
    Replies: 0
    Last Post: 11-29-2007, 09:28 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •