Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4097316

Checkbox text alignment

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P4 P4
    • None
    • 1.1.5
    • client-libs
    • sparc
    • solaris_2.5.1



      Name: mf23781 Date: 12/05/97


      import java.awt.*;

      public class checkbox extends Frame {

          public checkbox() {
              super("Checkbox");
              setLayout(new GridLayout(3,1));
              CheckboxGroup g = new CheckboxGroup();
              add(new Checkbox("name 1", g, false));
              add(new Checkbox("my next choice", g, false));
              add(new Checkbox("last", g, false));
          }

          static public void main(String args[]) {
              checkbox cb = new checkbox();
              cb.resize(170,150);
              cb.show();
          }
      }

      The text on Checkbox items is centre-aligned on Solaris but
      left-aligned on Win32. The latter seems more appropriate so I've
      changed our AIX port to do this. The fix is simple:

      in src/solaris/sun/awt_Checkbox.c add:

      XtSetArg(args[argc], XmNalignment, XmALIGNMENT_BEGINNING); argc++;

      to the bunch of XtSetArg(..) lines in
      sun_awt_motif_MCheckboxPeer_create().


      ======================================================================

            rramsunw Ranganathan Ram (Inactive)
            miflemi Mick Fleming
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: