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

Fonts sizes in JDK1.4 different from fonts sizes in jdk1.3

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P4
    • Resolution: Duplicate
    • Affects Version/s: 1.4.0
    • Fix Version/s: None
    • Component/s: client-libs
    • Labels:
    • Subcomponent:
      2d
    • CPU:
      x86
    • OS:
      linux_2.4, windows_nt

      Description

      jdk1.4-b68 + Pilsen-010613_1
      on linux 2.4.5 SMP RedHat 7.0 (upgrated of'course:-)
      ==========================================

      font size is different from fonts used in jdk1.3

      I can't say that it is bad at all.I just like to point to this and if someone could have a look at it.
      From my point of view fonts used in the IDE with jdk1.3, jdk1.2 I take as a standard. And it differs in jdk1.4 using the same IDE.
      Mainly in Editor. The fonts is bigger(or just seems it is) and row spacing is bigger significantly.

      I attache screenshots of editor and main window
      once for jdk1.4
      and once for jdk1.3

      significant difference is in Editor.


      *daniel.mladek@czech 2001-06-20
      oupsss! by mistake I put here wrong:
      Work around and Comments
      So it might be more clear now?
      *daniel.mladek@czech 2001-06-20

      Name: ddT132432 Date: 11/05/2001


      java version "1.4.0-beta"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-b
      Java HotSpot(TM) Client VM (build 1.4.0-beta-b65, mixed mode)

      The same problem with
      java version "1.4.0-beta2"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-b
      Java HotSpot(TM) Client VM (build 1.4.0-beta2-b77, mixed mode)

      Font size and shape is different from
      java version "1.3.0"
      Java(TM) 2 Runtime Environment, Standard Edition (build
      Java HotSpot(TM) Client VM (build 1.3.0-C, mixed mode)

      The default font size and shape for JButton have changed in the jre 1.4. The
      following code demonstrates the problem:

      import javax.swing.*;
      import java.awt.*;

      public class BugApplication {
        boolean packFrame = false;

        /**Construct the application*/
        public BugApplication() {
          Frame frame = new Frame();
          //Validate frames that have preset sizes
          //Pack frames that have useful preferred size info, e.g. from their layout
          if (packFrame) {
            frame.pack();
          }
          else {
            frame.validate();
          }
          frame.setVisible(true);
        }
        /**Main method*/
        public static void main(String[] args) {
          try {
            UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
          }
          catch(Exception e) {
            e.printStackTrace();
          }
          new BugApplication();
        }
      }


      class Frame extends JFrame {
        JPanel contentPane;
        BorderLayout borderLayout1 = new BorderLayout();
        JButton jVirtualMachine = new JButton();

        /**Construct the frame*/
        public Frame() {
          enableEvents(AWTEvent.WINDOW_EVENT_MASK);
          try {
            jbInit();
          }
          catch(Exception e) {
            e.printStackTrace();
          }
        }
        /**Component initialization*/
        private void jbInit() throws Exception {

          jVirtualMachine.setText("Cannot determine java virtual machine");
          try {
            String machine = System.getProperty("java.runtime.name");
            String version = System.getProperty("java.runtime.version");
            jVirtualMachine.setText("Running on "+machine+" v "+version);
          } catch (Exception exc)
             {
             };

          jVirtualMachine.setBackground(Color.lightGray);
          //setIconImage(Toolkit.getDefaultToolkit().createImage(Frame.class.getResource("[Your Icon]")));
          contentPane = (JPanel) this.getContentPane();
          contentPane.setLayout(borderLayout1);
          this.setSize(new Dimension(637, 61));
          this.setTitle("Letter sizes are different on different versions ov Java virtual machine");

          contentPane.add(jVirtualMachine, BorderLayout.CENTER);

        }
      }

      This is mainly generated by JBuilder, but it looks absolutely correct for my
      and I cant understand from where it can be the differences between versions
      here.

      Lauch this under different platforms and you will see that under jre 1.4.0 the
      text on the large button is about 10 % larger than under jre 1.3.0.

      In a simple applications the bug usually has no effect and a new font may look
      even better. However in some cases the larger texts no longer fit into the
      buttons. This makes part of the text invisible, making the older programs
      difficult to use under the new jre.

        To my mind, it is better not to change the default font sizes frequently,
      causing these unnecessary problems. Also, some programming tools (for example,
      JBuilder 4) can use the older jre for preview, and the programmer no longer
      sees how exactly the created GUI will look.
      (Review ID: 135033)
      ======================================================================

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                prr Philip Race
                Reporter:
                duke J. Duke (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: