src/demo/share/jfc/J2Ddemo/java2d/CloningFeature.java
changeset 52252 de9486d74a74
parent 50146 0bb0e464ee76
equal deleted inserted replaced
52251:b43c2aa001a5 52252:de9486d74a74
     1 /*
     1 /*
     2  *
     2  *
     3  * Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved.
     3  * Copyright (c) 2007, 2018, Oracle and/or its affiliates. All rights reserved.
     4  *
     4  *
     5  * Redistribution and use in source and binary forms, with or without
     5  * Redistribution and use in source and binary forms, with or without
     6  * modification, are permitted provided that the following conditions
     6  * modification, are permitted provided that the following conditions
     7  * are met:
     7  * are met:
     8  *
     8  *
   159             Thread.sleep(3333);
   159             Thread.sleep(3333);
   160         } catch (Exception e) {
   160         } catch (Exception e) {
   161             return;
   161             return;
   162         }
   162         }
   163 
   163 
   164         Component cmps[] = dg.clonePanels[0].getComponents();
   164         Component[] cmps = dg.clonePanels[0].getComponents();
   165         for (int i = 0; i < cmps.length && thread != null; i++) {
   165         for (int i = 0; i < cmps.length && thread != null; i++) {
   166             if ((dp = (DemoPanel) cmps[i]).tools == null) {
   166             if ((dp = (DemoPanel) cmps[i]).tools == null) {
   167                 continue;
   167                 continue;
   168             }
   168             }
   169             switch (i) {
   169             switch (i) {