My favorites
▼
|
Sign in
lineadecodigo
Web Code Samples in spanish
Project Home
Downloads
Wiki
Issues
Source
Checkout
Browse
Changes
Source path:
svn
/
trunk
/
lineadecodigo_java
/
src
/
com
/
lineadecodigo
/
java
/
swing
/
BotonConTooltip.java
r478
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
package com.lineadecodigo.java.swing;
/**
* @file CerrarVenatana.java
* @version 1.0
* @author Linea de Codigo (http://lineadecodigo.com)
* @date 27-agosto-2010
* @url http://lineadecodigo.com/java/anadir-un-tooltip-a-un-jbutton/
* @description Código que nos permite añadir un tooltip a un botón
*/
import java.awt.FlowLayout;
import javax.swing.JButton;
import javax.swing.JFrame;
public class BotonConTooltip extends JFrame {
private static final long serialVersionUID = 1L;
public BotonConTooltip(){
super("Botón con Tooltip");
getContentPane().setLayout(new FlowLayout());
JButton boton = new JButton("Pasa sobre este botón");
boton.setToolTipText("Tooltip del botón");
getContentPane().add(boton);
setSize(400,300);
setVisible(true);
}
public static void main(String[] args) {
new BotonConTooltip();
}
}
Show details
Hide details
Change log
r274
by vcuervo on Aug 27, 2010
Diff
Botón con tooltip
Go to:
.../java/swing/BotonConTooltip.java
Project members,
sign in
to write a code review
Older revisions
All revisions of this file
File info
Size: 905 bytes, 38 lines
View raw file
Powered by
Google Project Hosting