I want to create a tool tip which has fix rectangular size and show custom font's...
Any tips or link or any material to start with?

Recommended Answers

All 4 Replies

You can subclass JToolTip to create a custom appearance etc, then subclass the control in question to override its public JToolTip createToolTip() method (inherited from JComponent) to return an instance of your customised JToolTip subclass.

Thanx It solved my problem....

UIManager.put("ToolTip.foreground", new ColorUIResource(Color.WHITE));
		UIManager.put("ToolTip.background",new ColorUIResource(176,23,31));
		UIManager.put("ToolTip.font",	new FontUIResource(Font.SANS_SERIF,Font.BOLD,16));

We can use to change fonts , fore groud, background and border without sub classing JToolTip...
Just Write before setting ToolTip for any component.

that really wrong way, but in other hands works too, but for whole JVM instance

post by @JamesCherrill goes another direction, then could it be same as you set any methotds for JLabel, JPanel ....

that isn't Custom JToolTip, just override vanilla UI

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.