1
I would like to use tooltips
as in the library balloontip, but I haven’t found a way to use it, it seems to be different from toolTips
conventional methods that use the method to be applied setToolTipText
.
How can I apply this balloontip
for a component ?
I try to do so:
import java.awt.EventQueue;
import javax.swing.JFrame;
import javax.swing.JTextField;
import net.java.balloontip.BalloonTip;
public class TesteBalloonTip extends JFrame {
private JTextField jTextField = new JTextField();
public static void main(String[] args) {
EventQueue.invokeLater(()
-> {
TesteBalloonTip tp = new TesteBalloonTip();
tp.setVisible(true);
}
);
}
public TesteBalloonTip() {
BalloonTip ballon = new BalloonTip();
ballon.setAttachedComponent(jTextField);
setSize(500, 300);
setLocationRelativeTo(null);
setDefaultCloseOperation(EXIT_ON_CLOSE);
}
}
however, when I try to instantiate a ballotip-like object, it gives me error saying:
Balloontip() has protected access in Balloontip
There are examples, already downloaded the examples to see how they were made?
– user28595
@Articuno I downloaded , performed, but do not know how to use :(
– JavaTech
Post what tried to.
– user28595
@Articuno ta there, it was something very "simple "
– JavaTech
I understand you didn’t follow my guidance on last answer.
– user28595
@Careless cunning, man, the more I changed now !
– JavaTech