Answer the question
In order to leave comments, you need to log in
What to use to be able to hover the mouse over a word??
There is a window application, it has a text field, which displays a certain text, what to use so that you can hover over a word and get, for example, a hint ??? It's like in a browser on some sites, when you hover over a word, for example, a translation comes out. And is it even possible to check this?
Answer the question
In order to leave comments, you need to log in
Swing
JLabel tooltipLabel = new JLabel("Username");
tooltipLabel.setToolTipText("Enter your username");
JTextField tooltipTextfield = new JTextField(10);
tooltipTextfield.setToolTipText("Enter your username over here, that other thing is a label.");
PasswordField pf = new PasswordField();
Tooltip tooltip = new Tooltip();
tooltip.setText(
"Your text");
pf.setTooltip(tooltip);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question