1 7 8 package com.sun.java.swing.plaf.windows; 9 10 import javax.swing.*; 11 import javax.swing.plaf.basic.*; 12 import javax.swing.plaf.ComponentUI ; 13 import java.awt.event.*; 14 15 28 public class WindowsDesktopPaneUI extends BasicDesktopPaneUI 29 { 30 public static ComponentUI createUI(JComponent c) { 31 return new WindowsDesktopPaneUI(); 32 } 33 34 protected void installDesktopManager() { 35 desktopManager = desktop.getDesktopManager(); 36 if(desktopManager == null) { 37 desktopManager = new WindowsDesktopManager(); 38 desktop.setDesktopManager(desktopManager); 39 } 40 } 41 42 protected void installDefaults() { 43 super.installDefaults(); 44 } 45 46 protected void installKeyboardActions() { 47 super.installKeyboardActions(); 48 49 if(!desktop.requestDefaultFocus()) { 51 desktop.requestFocus(); 52 } 53 } 54 } 55 | Popular Tags |