Terai Atsuhiro 2022-03-06 (日) 07:22:26

http://terai.s55.xrea.com/swing/lrcombobox/screenshot.png

class LRItem{
  private final String leftText;
  private final String rightText;
  public LRItem(String strLeft, String strRight) {
    leftText = strLeft;
    rightText = strRight;
  }
  public String getHtmlText() {
    String str = "<html><table width='240'><tr><td align='left'>" +
                 leftText;
    str = str + "</td><td align='right'>" + rightText +
          "</td></tr></table></html>";
    return str;
  }
  public String getLeftText()  { return leftText; }
  public String getRightText() { return rightText; }
  public String toString()     { return getHtmlText(); }
}