Code example for JLabel

Methods: setToolTipText

0
 
		String msg1 = "Both chainID and range specification are optional. If both are provided, range has preference.";
		l21.setToolTipText(msg1);
		c.setToolTipText(msg1);
 
		JLabel rangeL = new JLabel(" Range " + pos + ":");
		hBox.add(Box.createGlue());
		hBox.add(rangeL);
		r.setMaximumSize(new Dimension(Short.MAX_VALUE,30));
 
		// set help text: 
		String msg ="Syntax example: A:407-495,A:582-686";
		rangeL.setToolTipText(msg);
		r.setToolTipText(msg);
 
		//hBox.add(Box.createGlue()); 
		hBox.add(r,BorderLayout.CENTER);
 
		//hBox21.add(Box.createGlue());