Results 1 to 5 of 5

Thread: JInternalFrame.JDesktopIcon class

  1. #1
    Join Date
    Dec 2009
    Posts
    67

    JInternalFrame.JDesktopIcon class

    Hello guys,

    I am quit confused about some concepts of java classes. For me java programmings seems quit tough to understand. I am not able to understand the concept of 'JInternalFrame.JDesktopIcon class' of java. I have referred lots of advanced java book, but didn't get enough details over this class. I wonder if your are able to provide me some details about the JInternalFrame.JDesktopIcon class of java. I would really appreciate your any help.

  2. #2
    Join Date
    Apr 2008
    Posts
    1,948

    Re: JInternalFrame.JDesktopIcon class

    A JInternalFrame.JDesktopIcon class component represents an iconified version of a JInternalFrame. This API should NOT BE USED by Swing applications, as it will go away in future versions of Swing as its functionality is moved into JInternalFrame. This class is public only so that UI objects can display a desktop icon. If an application wants to display a desktop icon, it should create a JInternalFrame instance and iconify it.

  3. #3
    Join Date
    May 2008
    Posts
    2,012

    Re: JInternalFrame.JDesktopIcon class

    Hi friend,

    See if something below code for JInternalFrame.JDesktopIcon class can help you or not:
    Code:
    javax.swing.JInternalFrame.JDesktopIcon
    
    public class FTdemo extends JFrame {
      private JDesktopPane desk01;
    
      public FTdemo(String title) {
        super(title);
        setDefaultCloseOperation(EXIT_ON_CLOSE);
        desk01 = new JDesktopPane();
        setContentPane(desk01);
      }
    
      private void addFrame(int number) {
        JInternalFrame f03 = new JInternalFrame("Frame " + number, true, true,true, true);
        f03.setBounds(number * 10 - 5, number * 10 - 5, 250, 150);
        desk01.add(f03, 1);
        f03.setVisible(true);
      }
    
      public static void main(String[] args) {
        Figure3 tdW = new Figure3("");
    
        tdW.setSize(400, 220);
        tdW.setVisible(true);
        f03or (int i = 1; i <= 4; i++) {
          tdW.addFrame(i);
        }
      }
    }

  4. #4
    Join Date
    Apr 2008
    Posts
    2,005

    Re: JInternalFrame.JDesktopIcon class

    Hi,

    I recommend you to review following some important methods and constructors of JInternalFrame.JDesktopIcon class:
    • setUI(DesktopIconUI dui)
    • getAccessibleContext()
    • setInternalFrame(JInternalFrame IFR)
    • getUIClassID()
    • JInternalFrame.JDesktopIcon(JInternalFrame JFR)
    • updateUI()

  5. #5
    Join Date
    May 2008
    Posts
    2,297

    Re: JInternalFrame.JDesktopIcon class

    Hello friend,

    The following example of java code, will show you the working of 'JInternalFrame.JDesktopIcon class':
    Code:
    javax.swing.JInternalFrame.JDesktopIcon
    import javax.swing.SwingUtilities;
    
    public class GUIUtilsDM {
     
      public static boolean isToolWindow(JInternalFrame frameK) {
        if (frameK == null) {
          throw new IllegalArgumentException("null JInternalFrame passed");
        }
    
        final Object obj1 = frameK.getClientProperty("JInternalFrame.isPalette");
        return obj1 != null && obj == Boolean.TRUE;
      }
      
      public static void makeToolWindow(JInternalFrame frameK, boolean isToolWindow) {
        if (frameK == null) {
          throw new IllegalArgumentException("null JInternalFrame passed");
        }
        frameK
            .putClientProperty("JInternalFrame.isPalette", isToolWindow ? Boolean.TRUE : Boolean.FALSE);
      }
    }

Similar Threads

  1. Replies: 8
    Last Post: 08-10-2011, 11:06 PM
  2. Confused with JInternalFrame class
    By Truster in forum Software Development
    Replies: 5
    Last Post: 17-02-2010, 09:58 AM
  3. How to Call a JDialog from a JInternalFrame?
    By Bhardwaj in forum Software Development
    Replies: 5
    Last Post: 16-01-2010, 01:27 PM
  4. Ultra solid drives:Imation M-Class and S-Class
    By Regina in forum Portable Devices
    Replies: 1
    Last Post: 03-04-2009, 10:34 AM
  5. Good news for CBSE CLASS X & CLASS IX - visit learnnext
    By surya_expert in forum Education Career and Job Discussions
    Replies: 0
    Last Post: 13-12-2008, 12:09 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,718,329,442.42945 seconds with 17 queries