@@ -43,8 +43,6 @@ import javax.swing.JSeparator
4343import javax.swing.JSplitPane
4444import javax.swing.JTabbedPane
4545import javax.swing.JTable
46- import javax.swing.JTextArea
47- import javax.swing.JTextField
4846import javax.swing.SwingConstants
4947import javax.swing.UIManager
5048import javax.swing.border.EmptyBorder
@@ -92,18 +90,18 @@ class RunnerPanel implements FocusListener, ActionListener {
9290 JCheckBoxMenuItem showWarningIndicatorCheckBoxMenuItem
9391 JCheckBoxMenuItem showInfoIndicatorCheckBoxMenuItem
9492 JCheckBoxMenuItem syncDetailTabCheckBoxMenuItem
95- JTextField testOwnerTextField
96- JTextField testPackageTextField
97- JTextField testProcedureTextField
98- JTextArea testDescriptionTextArea
99- JTextArea testIdTextArea
100- JTextField testStartTextField
93+ RunnerTextField testOwnerTextField
94+ RunnerTextField testPackageTextField
95+ RunnerTextField testProcedureTextField
96+ RunnerTextArea testDescriptionTextArea
97+ RunnerTextArea testIdTextArea
98+ RunnerTextField testStartTextField
10199 FailuresTableModel failuresTableModel
102100 JTable failuresTable
103- JTextArea testFailureMessageTextArea
104- JTextArea testErrorStackTextArea
105- JTextArea testWarningsTextArea
106- JTextArea testServerOutputTextArea
101+ RunnerTextArea testFailureMessageTextArea
102+ RunnerTextArea testErrorStackTextArea
103+ RunnerTextArea testWarningsTextArea
104+ RunnerTextArea testServerOutputTextArea
107105 JTabbedPane testDetailTabbedPane
108106
109107 def Component getGUI () {
@@ -758,7 +756,7 @@ class RunnerPanel implements FocusListener, ActionListener {
758756 c. weightx = 0
759757 c. weighty = 0
760758 testInfoPanel. add(testOwnerLabel, c)
761- testOwnerTextField = new JTextField
759+ testOwnerTextField = new RunnerTextField
762760 testOwnerTextField. editable = false
763761 c. gridx = 1
764762 c. gridy = 0
@@ -782,7 +780,7 @@ class RunnerPanel implements FocusListener, ActionListener {
782780 c. weightx = 0
783781 c. weighty = 0
784782 testInfoPanel. add(testPackageLabel, c)
785- testPackageTextField = new JTextField
783+ testPackageTextField = new RunnerTextField
786784 testPackageTextField. editable = false
787785 c. gridx = 1
788786 c. gridy = 1
@@ -806,7 +804,7 @@ class RunnerPanel implements FocusListener, ActionListener {
806804 c. weightx = 0
807805 c. weighty = 0
808806 testInfoPanel. add(testProcedureLabel, c)
809- testProcedureTextField = new JTextField
807+ testProcedureTextField = new RunnerTextField
810808 testProcedureTextField. editable = false
811809 c. gridx = 1
812810 c. gridy = 2
@@ -830,7 +828,7 @@ class RunnerPanel implements FocusListener, ActionListener {
830828 c. weightx = 0
831829 c. weighty = 0
832830 testInfoPanel. add(testDescriptionLabel, c)
833- testDescriptionTextArea = new JTextArea
831+ testDescriptionTextArea = new RunnerTextArea
834832 testDescriptionTextArea. editable = false
835833 testDescriptionTextArea. enabled = true
836834 testDescriptionTextArea. lineWrap = true
@@ -858,7 +856,7 @@ class RunnerPanel implements FocusListener, ActionListener {
858856 c. weightx = 0
859857 c. weighty = 0
860858 testInfoPanel. add(testIdLabel, c)
861- testIdTextArea = new JTextArea
859+ testIdTextArea = new RunnerTextArea
862860 testIdTextArea. editable = false
863861 testIdTextArea. enabled = true
864862 testIdTextArea. lineWrap = true
@@ -886,7 +884,7 @@ class RunnerPanel implements FocusListener, ActionListener {
886884 c. weightx = 0
887885 c. weighty = 0
888886 testInfoPanel. add(testStartLabel, c)
889- testStartTextField = new JTextField
887+ testStartTextField = new RunnerTextField
890888 testStartTextField. editable = false
891889 c. gridx = 1
892890 c. gridy = 5
@@ -899,7 +897,6 @@ class RunnerPanel implements FocusListener, ActionListener {
899897 c. weighty = 0
900898 testInfoPanel. add(testStartTextField, c)
901899 // - Vertical spring and scrollbar for info panel
902- val testInfoVerticalSpringLabel = new JLabel
903900 c. gridx = 0
904901 c. gridy = 6
905902 c. gridwidth = 1
@@ -909,7 +906,7 @@ class RunnerPanel implements FocusListener, ActionListener {
909906 c. fill = GridBagConstraints :: BOTH
910907 c. weightx = 0
911908 c. weighty = 1
912- testInfoPanel. add(testInfoVerticalSpringLabel , c)
909+ testInfoPanel. add(Box . createVerticalGlue() , c)
913910 val testPropertiesScrollPane = new JScrollPane (testInfoPanel)
914911
915912 // Failures tabbed pane (failed expectations)
@@ -927,7 +924,7 @@ class RunnerPanel implements FocusListener, ActionListener {
927924 failuresDescription. headerRenderer = failuresTableHeaderRenderer
928925 val failuresTableScrollPane = new JScrollPane (failuresTable)
929926 // - failures details
930- testFailureMessageTextArea = new JTextArea
927+ testFailureMessageTextArea = new RunnerTextArea
931928 testFailureMessageTextArea. editable = false
932929 testFailureMessageTextArea. enabled = true
933930 testFailureMessageTextArea. lineWrap = true
@@ -951,7 +948,7 @@ class RunnerPanel implements FocusListener, ActionListener {
951948 // Errors tabbed pane (Error Stack)
952949 val testErrorStackPanel = new JPanel
953950 testErrorStackPanel. setLayout(new GridBagLayout ())
954- testErrorStackTextArea = new JTextArea
951+ testErrorStackTextArea = new RunnerTextArea
955952 testErrorStackTextArea. editable = false
956953 testErrorStackTextArea. enabled = true
957954 testErrorStackTextArea. lineWrap = true
@@ -962,7 +959,7 @@ class RunnerPanel implements FocusListener, ActionListener {
962959 c. gridy = 0
963960 c. gridwidth = 1
964961 c. gridheight = 1
965- c. insets = new Insets (10 , 10 , 10 , 10 ) // top, left, bottom, right
962+ c. insets = new Insets (0 , 0 , 0 , 0 ) // top, left, bottom, right
966963 c. anchor = GridBagConstraints :: WEST
967964 c. fill = GridBagConstraints :: BOTH
968965 c. weightx = 1
@@ -972,7 +969,7 @@ class RunnerPanel implements FocusListener, ActionListener {
972969 // Warnings tabbed pane
973970 val testWarningsPanel = new JPanel
974971 testWarningsPanel. setLayout(new GridBagLayout ())
975- testWarningsTextArea = new JTextArea
972+ testWarningsTextArea = new RunnerTextArea
976973 testWarningsTextArea. editable = false
977974 testWarningsTextArea. enabled = true
978975 testWarningsTextArea. lineWrap = true
@@ -983,7 +980,7 @@ class RunnerPanel implements FocusListener, ActionListener {
983980 c. gridy = 0
984981 c. gridwidth = 1
985982 c. gridheight = 1
986- c. insets = new Insets (10 , 10 , 10 , 10 ) // top, left, bottom, right
983+ c. insets = new Insets (0 , 0 , 0 , 0 ) // top, left, bottom, right
987984 c. anchor = GridBagConstraints :: WEST
988985 c. fill = GridBagConstraints :: BOTH
989986 c. weightx = 1
@@ -993,7 +990,7 @@ class RunnerPanel implements FocusListener, ActionListener {
993990 // Info tabbed pane (Server Output)
994991 val testServerOutputPanel = new JPanel
995992 testServerOutputPanel. setLayout(new GridBagLayout ())
996- testServerOutputTextArea = new JTextArea
993+ testServerOutputTextArea = new RunnerTextArea
997994 testServerOutputTextArea. editable = false
998995 testServerOutputTextArea. enabled = true
999996 testServerOutputTextArea. lineWrap = true
@@ -1004,7 +1001,7 @@ class RunnerPanel implements FocusListener, ActionListener {
10041001 c. gridy = 0
10051002 c. gridwidth = 1
10061003 c. gridheight = 1
1007- c. insets = new Insets (10 , 10 , 10 , 10 ) // top, left, bottom, right
1004+ c. insets = new Insets (0 , 0 , 0 , 0 ) // top, left, bottom, right
10081005 c. anchor = GridBagConstraints :: WEST
10091006 c. fill = GridBagConstraints :: BOTH
10101007 c. weightx = 1
@@ -1030,5 +1027,10 @@ class RunnerPanel implements FocusListener, ActionListener {
10301027 c. weightx = 1
10311028 c. weighty = 1
10321029 basePanel. add(horizontalSplitPane, c)
1030+
1031+ // fix missing borders (e.g. on windows look and feel)
1032+ val referenceBorder = testOwnerTextField. border
1033+ testDescriptionTextArea. border = referenceBorder
1034+ testIdTextArea. border = referenceBorder
10331035 }
10341036}
0 commit comments