SetTargetColour before dialog.show
authoramwaterhouse <Andrew Waterhouse>
Wed, 11 Apr 2007 14:30:49 +0000 (14:30 +0000)
committeramwaterhouse <Andrew Waterhouse>
Wed, 11 Apr 2007 14:30:49 +0000 (14:30 +0000)
src/jalview/appletgui/UserDefinedColours.java

index aa260c5..282e757 100755 (executable)
@@ -87,9 +87,9 @@ public class UserDefinedColours
     caller = fr;\r
     originalColour = fr.colourPanel.getBackground();\r
     originalLabel = "Feature Colour";\r
-    setTargetColour(fr.colourPanel.getBackground());\r
-\r
     setForDialog("Select Feature Colour", alignframe);\r
+    setTargetColour(fr.colourPanel.getBackground());\r
+    dialog.show();\r
   }\r
 \r
   public UserDefinedColours(Component caller,\r
@@ -99,9 +99,9 @@ public class UserDefinedColours
     this.caller = caller;\r
     originalColour = col1;\r
     originalLabel = "Select Colour";\r
-    setTargetColour(col1);\r
-\r
     setForDialog("Select Colour", alignframe);\r
+    setTargetColour(col1);\r
+    dialog.show();\r
   }\r
 \r
 \r
@@ -141,7 +141,6 @@ public class UserDefinedColours
               + (alignframe.getSize().height - height) / 2,\r
               width, height);\r
 \r
-    dialog.show();\r
   }\r
 \r
   public void actionPerformed(ActionEvent evt)\r
@@ -298,6 +297,7 @@ public class UserDefinedColours
     R = col.getRed();\r
     G = col.getGreen();\r
     B = col.getBlue();\r
+\r
     rScroller.setValue(R);\r
     gScroller.setValue(G);\r
     bScroller.setValue(B);\r