Jbutton btnhelptrain = new jbutton ("") {Private Static final long serialversionuid = 4152821268120579799l; Public jtooltip createconltip () {jtooltip tip = super. createconltip (); // multilineconltip tip = new multilineconltip (); tip. setbackground (new color (0 xfffacd); tip. setforeground (color. red); Return tip;} public Boolean contains (int x, int y) {If (x <100) {// settooltiptext ("got green eggs? ");} Else {// settooltiptext (" got ham? ");} Return Super. contains (x, y);}/** public point gettooltiplocation (mouseevent event) {return New * point (event. getx () + 100), (event. gety () + 100);} */}; btnhelptrain. settooltiptext ("<HTML> 10 fields, respectively <br>" + "1, departure date <br>" + "2, the vehicle number format is 55366k13700 <br> "+" 3. vehicle number <br> "+" 4. Departure station code, for example, SNH <br> "+" 5, the arrival station code is CSQ <br> "+" 6. The departure time is <br> "+" 7. The arrival time is <br> "+" 8, the departure site name is in the south of Shanghai <br> "+" 9, and the arrival site name is in the west of Beijing <br> "+" 10. The arrival time format is, indicating 14 hours and 11 minutes