这里面包含了一百多个JAVA源文件

源代码在线查看: e564. iconifying and maximizing a frame.txt

软件大小: 551 K
上传用户: maple_78
关键词: JAVA
下载地址: 免注册下载 普通下载 VIP

相关代码

				This example implements methods to iconify, deiconify, minimize, and maximize a frame. In general, you should not make calls such as Frame.setExtendedState(Frame.ICONIFIED) because this would destroy the maximized state of the frame. Instead, the Frame.ICONIFIED state should be combined with the current maximized state of the frame. 
				    // This method iconifies a frame; the maximized bits are not affected.
				    public void iconify(Frame frame) {
				        int state = frame.getExtendedState();
				    
				        // Set the iconified bit
				        state |= Frame.ICONIFIED;
				    
				        // Iconify the frame
				        frame.setExtendedState(state);
				    }
				    
				    // This method deiconifies a frame; the maximized bits are not affected.
				    public void deiconify(Frame frame) {
				        int state = frame.getExtendedState();
				    
				        // Clear the iconified bit
				        state &= ~Frame.ICONIFIED;
				    
				        // Deiconify the frame
				        frame.setExtendedState(state);
				    }
				    
				    // This method minimizes a frame; the iconified bit is not affected
				    public void minimize(Frame frame) {
				        int state = frame.getExtendedState();
				    
				        // Clear the maximized bits
				        state &= ~Frame.MAXIMIZED_BOTH;
				    
				        // Maximize the frame
				        frame.setExtendedState(state);
				    }
				    
				    // This method minimizes a frame; the iconified bit is not affected
				    public void maximize(Frame frame) {
				        int state = frame.getExtendedState();
				    
				        // Set the maximized bits
				        state |= Frame.MAXIMIZED_BOTH;
				    
				        // Maximize the frame
				        frame.setExtendedState(state);
				    }
				
							

相关资源