How can I change a decorated JFrame to non-decorated JFrame?

I want to change a decorated JFrame to a non-decorated JFame. The frame already shown on the screen. How can I do this?

If I call dispose() and setVisible(), the window ID will be changed. I am working on Linux and need to communicate with other processes by window ID. Is there a method to set a frame decorate without change window ID?

Similar Messages

  • How can I change the payment method to None with gift card balance.

    How can I change the payment method to None with gift card balance?
    I already have an Apple ID account with no credit card but when I try to log in download free app it says Apple ID has not been used in iTunes store please review your account and it appears the billing info and there's no none in the option..how can I solve this so that I can used my Apple ID and can download free apps?

    Hi ..
    Help here >  Why can’t I select None when I edit my payment information?HHi

  • How can I change my payment info to none???

    I can't do anything as far as apps are concerned! It keeps telling me to update my billing info. I have no credit card and need to change it to none but it won't let me help!!!!!

    Creating an iTunes Store, App Store, iBookstore, and Mac App Store account without a credit card

  • How can I change the Jframe Java help Icon

    How can I change then Jframe Java help Icon?.
    I am using then HelpSet class and HelpBroker.
    I want to change the java help icon
    Any Idea? thanks. ...

    It can be done, but it's ugly...
    Add in a listener to your topmost JFrame to sense when the focus is lost, since this happens when a help window comes up. When the focus leaves the main window, check all the windows that are up to see if one is a help window. If so, this will give you a reference to the help window and you can drill down to change what you want.
    Here's an example that changes the icon and removes the borders from the javahelp buttons.
    WindowListener wndCloser = new WindowAdapter() {
              //A necessarily roundabout method to affect
              //look and feel aspects of the javahelp viewer.
              //(there is no way to get at these components directly.)
              //When the main frame loses focus, it may be because
              //the help viewer was brought up. Look through all
              //the current frames to see if one is a help viewer.
              //If it is, change the look of the help viewer
              //to what we want.
              Frame m_helpFrame = null;
              public void windowDeactivated(WindowEvent e) {
              if (m_helpFrame != null)
                   return;
              Frame[] frames = getFrames();
              for (int k = 0; k < frames.length; k++) {
                   if (!(frames[k] instanceof JFrame))
                   continue;
                   JFrame jf = (JFrame)frames[k];
                   if (jf.getContentPane().getComponentCount()==0)
                   continue;
                   Component c = jf.getContentPane().
                   getComponent(0);
                   if (c == null || !(c instanceof JHelp))
                   continue;
                   m_helpFrame = jf;
                   //now that we know the Frame, we can change the title icon
                   final Image image2 = <your icon here>
                   m_helpFrame.setIconImage(image2);
                   JHelp jh = (JHelp)c;
                   for (int s=0; s<jh.getComponentCount(); s++) {
                   c = jh.getComponent(s);
                   if (c == null || !(c instanceof JToolBar))
                        continue;
                   JToolBar jtb = (JToolBar)c;
                   //now that we've accessed the toolbar, we can
                   //modify the look of the buttons.
                   for(int i=0; i<jtb.getComponentCount(); i++) {
                        Component comp = jtb.getComponentAtIndex(i);
                        if(comp instanceof JButton) {
                        JButton button = (JButton)comp;
                        button.setBorder(null);

  • How can I change the Icon on the JFrame?

    Everytime, when I create an application, the default javalogo will show on the left top concern of the application which using JFrame, how can I change it to the other?

    Have you tried using the setIconImage method like this:
    JFrame F=new JFrame();
    F.setIconImage(Toolkit.getDefaultToolkit().getImage("myIcon.gif"));
    Here is what the API doc says:
    setIconImage
    public void setIconImage(Image image)
    Sets the image to be displayed in the minimized icon for this frame. Not all platforms support the concept of minimizing a window.
    Parameters:
    image - the icon image to be displayed. If this parameter is null then the icon image is set to the default image, which may vary with platform.

  • How can i change the particular node color in Jtree?

    I have constructed the tree.i dont know how to set the color for the particular node then how can i change the particular node icon depends on some conditions like if we will give the input whether it is available in jtree that node icon only changed.Anyone please help me as soon as possible.

    hi,
    i saw that tutorial.from that book i dont get the particular node cell renderer.i got a cell renderer for tree only.i attached my code in this mail.pls see and help me if u will do
    mport pack.Prop;
    import java.awt.BorderLayout;
    import java.awt.Color;
    import java.awt.Component;
    import java.awt.Container;
    import java.awt.Font;
    import java.io.BufferedReader;
    import java.io.File;
    import java.io.FileInputStream;
    import java.io.IOException;
    import java.io.InputStreamReader;
    import java.util.Properties;
    import java.util.Set;
    import java.util.StringTokenizer;
    import java.util.Vector;
    import javax.swing.Icon;
    import javax.swing.ImageIcon;
    import javax.swing.JFrame;
    import javax.swing.JLabel;
    import javax.swing.JScrollPane;
    import javax.swing.JTree;
    import javax.swing.UIManager;
    import javax.swing.text.Position;
    import javax.swing.tree.DefaultMutableTreeNode;
    import javax.swing.tree.DefaultTreeCellRenderer;
    import javax.swing.tree.DefaultTreeModel;
    import javax.swing.tree.MutableTreeNode;
    import javax.swing.tree.TreeCellRenderer;
    import javax.swing.tree.TreePath;
    public class ReadProperty3 extends JFrame{
    String str,key;
    static JTree tree;
    static Vector v;
    StringTokenizer st;
    static DefaultMutableTreeNode root;
    DefaultMutableTreeNode t;     
    public Object[] o;
    public static void main(String[] args) throws IOException {
    ReadProperty3 r = new ReadProperty3();
    Prop p=new Prop();
    JFrame f=new JFrame();
    p.show();
    Object[] o=v.toArray();
    int startRow = 0;
    String prefix =p.s;
    TreePath path = tree.getNextMatch(prefix, startRow, Position.Bias.Forward);
    //if(prefix.equals(root.getChildAt(0).toString()))
    if(prefix.equals("2000"))
         System.out.println("Node 2000 found");
         else if(prefix.equals("3000"))
              System.out.println("Node 3000 found");
         else if(prefix.equals("4000"))
              System.out.println("Node 4000 found");
         else
              System.out.println("Node not found");
         for(int i=0;i<v.size();i++)
              //((DefaultTreeModel)tree.getModel()).reload();
              DefaultTreeCellRenderer ren=(DefaultTreeCellRenderer)tree.getCellRenderer();
              Icon openIcon = new ImageIcon("C:/apache-tomcat-5.5.12/webapps/jsp-examples/images/execute.gif");
              Icon closedIcon = new ImageIcon("C:/apache-tomcat-5.5.12/webapps/jsp-examples/images/execute.gif");
              Icon leafIcon = new ImageIcon("C:/apache-tomcat-5.5.12/webapps/jsp-examples/images/read.gif");
              if(o[0].equals(p.s))
                   ren.setBackgroundSelectionColor(Color.MAGENTA);
                   ren.setBackgroundNonSelectionColor(Color.YELLOW);
                   //ren.setTextSelectionColor(Color.YELLOW);
                   //ren.setTextNonSelectionColor(Color.BLUE);
                   ren.setClosedIcon(closedIcon);
                   ren.setFont(new Font("Impact",Font.ITALIC,14));
              else if(o[1].equals(p.s))
                   ren.setLeafIcon(leafIcon);
                   ren.setFont(new Font("Impact",Font.ITALIC,10));
                   UIManager.put("Tree.leafIcon", leafIcon);
              else if(o[2].equals(p.s))
                   ren.setOpenIcon(openIcon);
                   ren.setFont(new Font("Dialog",Font.BOLD,9));
    public ReadProperty3(){
         super("JTree With Properties");
         try{
    int c = 0;
    while(c == 0){
    c = 1;
    BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));
    System.out.print("Enter file name which has properties extension :");
    str = bf.readLine();
    File f = new File(str + ".properties");
    if(f.exists()){
    Properties pro = new Properties();
    FileInputStream in = new FileInputStream(f);
    pro.load(in);
    System.out.println("Key: " + pro.keySet());
    System.out.print("Enter Key : ");
    key = bf.readLine();
    String p = pro.getProperty(key);
    st = new StringTokenizer(p,"=,");
    root=new DefaultMutableTreeNode(key);
    v=new Vector();
    while(st.hasMoreTokens())
         String val=st.nextToken();
         v.add(val);
         o=v.toArray();
         System.out.println(val);
         t=new DefaultMutableTreeNode(val);
         root.add(t);
         tree=new JTree(root);
         tree.setEditable(true);
         JScrollPane jp=new JScrollPane(tree);
         // tree.setCellRenderer(new CellRenderer());
         Container content=getContentPane();
         content.add(jp,BorderLayout.CENTER);
    setSize(250,275);
    setVisible(true);
    addWindowListener(new ExitListener());
    else{
    c = 0;
    System.out.println("File not found!");
    catch(IOException e){
    System.out.println(e.getMessage());
    }

  • How can I change the palette of a BufferedImage

    How can I change the palette of a BufferedImage ?
    My image uses an IndexColorModel but I want to use a web safe palette.
    I can't see a way to make a setColorModel() to my image.
    Any ideas ?
    Thanks...

    import java.awt.*;
    import java.awt.event.*;
    import java.awt.image.*;
    import java.io.*;
    import java.net.*;
    import javax.imageio.*;
    import javax.swing.*;
    public class ICMExample extends JComponent {
        private BufferedImage original, copy;
        private Point mouseLocation = new Point();
        public ICMExample(BufferedImage original, BufferedImage copy) {
            this.original = original;
            this.copy = copy;
            addMouseMotionListener(new MouseMotionAdapter(){
                public void mouseDragged(MouseEvent e) {
                    mouseLocation = e.getPoint();
                    repaint();
        public Dimension getPreferredSize() {
            return new Dimension(original.getWidth(), original.getHeight());
        protected void paintComponent(Graphics g) {
            super.paintComponent(g);
            Graphics2D g2 = (Graphics2D) g;
            g2.drawRenderedImage(original, null);
            Shape oldClip = g2.getClip();
            g2.clipRect(0, 0, mouseLocation.x, Integer.MAX_VALUE);
            g2.drawRenderedImage(copy, null);
            g2.setClip(oldClip);
        public static void main(String[] args) throws IOException {
            URL url = new URL("http://weblogs.java.net/jag/Image54-large.jpeg");
            BufferedImage original = ImageIO.read(url);
            JComponent app = new ICMExample(original, makeICMVersion(original));
            final JFrame f = new JFrame("Drag mouse over image");
                f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
                f.getContentPane().add(app);
                f.pack();
                SwingUtilities.invokeLater(new Runnable(){
                    public void run() {
                        f.setLocationRelativeTo(null);
                        f.setVisible(true);
        static BufferedImage makeICMVersion(BufferedImage original) {
            int w = original.getWidth();
            int h = original.getHeight();
            IndexColorModel icm = createICM();
            BufferedImage copy = new BufferedImage(w, h, BufferedImage.TYPE_BYTE_INDEXED, icm);
            Graphics2D g = copy.createGraphics();
            g.drawRenderedImage(original, null);
            g.dispose();
            return copy;
        static IndexColorModel createICM() {
            byte MAX = (byte) 255;
            byte[] r = {MAX, MAX, MAX, MAX, 0, 0, 0, 0};
            byte[] g = {MAX, MAX, 0, 0, MAX, MAX, 0, 0};
            byte[] b = {MAX, 0, MAX, 0, MAX, 0, MAX, 0};
            return new IndexColorModel(3, 8, r, g, b);
    }

  • How can i change the icon in the top left of a jdialog

    how can i change the icon in the top left of a jdialog.
    thnkx in advance

    You cannot directly. If you have a jFrame (e.g.) with your own icon you can use one of the JDialog costructors using (Component owner, ... ). Then the dialog will display the same icon.

  • How can I change the red color of the news theme?

    I would prefer to use a different color for the news theme in iMovie.  Red doesn't look good with my pics.  How can I change it from red to another color?  Is that possible?

    try this
    import javax.swing.*;
    import java.awt.*;
    class Testing extends JFrame
      public Testing()
        setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        setSize(250,75);
        setLocation(400,300);
        JPanel jp = new JPanel();
        JToggleButton jtb = new JToggleButton("Toggle me");
        jtb.setUI(new MyUI());
        jp.add(jtb);
        getContentPane().add(jp);
      public static void main(String args[]){new Testing().setVisible(true);}
    class MyUI extends javax.swing.plaf.metal.MetalToggleButtonUI
      public Color getSelectColor(){return Color.BLACK;}
    }

  • How can we change the 'coffee cup' symbol

    sir/madam
    could you please tell me ,how can I change the coffee cup icon
    appeard at the left corner of the window to my own icon or image.

    public void JFrame.setIconImage(Image image)

  • If I chose the wrong folder as defaulf for downloads to go to, how can I change it?

    I use download manager. I hit '''yes''' when asked if I wanted to make the folder shown as the default for future downloads of that type. I did not mean to do that. How can I change the default folder?

    Hi belladonna82,
    You should take a look at the [[Downloads window]] and [[Options window - General panel]] Knowledge Base articles. They will give you all the details you need. Unless you are talking about the default action and not the actual download folder? If so, you should look at [[Options window - Applications panel]].
    Hopefully this helps!

  • How can I change the display of Inbox in my iPad's mail app- so that it takes up the full screen?

    How can I change the display of Inbox in my iPad's mail app- so that it takes up the whole screen, as opposed to just about one third; the other two thirds display the full text of the selected email?

    You can't change the display in the Mail app, if you are holding the iPad in landscape orientation then the left-hand third will be for navigation, and the right-hand two-thirds will be an email. If you hold the iPad in portrait orientation then the navigation section becomes a drop-down section.

  • How can I change the default "from" email account on my iPad/iPhone in IOS 8.2?

    I currently use my phone & pad for business and personal use.  My emails should come from my business account but they're coming from my Yahoo account.  How can I change it without having to manually change each email?  I've checked online but I don't see settings/mail,contacts,calendars/default account in this new revision of software.
    Thanks!

    Hi bschmidt0726,
    Go to "Setting"; scroll down to the 4th box for "iCloud"; You need to turn on you "Mail" option in the "iCloud" settings.
    Then,
    Go into "Settings", scroll down to "Mail, Contacts, Calendars"; on the left panel, scroll down to the 4th box; there you'll find the "Default Account" settings.

  • How can I change an english/american keyboard to a danish one?

    How can I change an english/american keyboard to a danish one on a Macbook Air?

    Apple menu / System Preferences / Keyboard / Input sources.
    Click + (bottom left) and in the pane that comes up, select Danish on the left, and click Add.
    Of course that can only change what the keys actually input, not what is written on the keys. If you wish to change the physical look of the keys as well, get in touch with Apple and ask if they can replace the keyboard.

  • I don't remember my old Apple ID and I closed my email account that I was using for my old Apple ID. Now, how can I change my icloud id on my Ipad. The old icloud id is still on my Ipad.

    I don't remember my old Apple ID and I closed my email account that I was using for my old Apple ID. Now, how can I change my icloud id on my Ipad. The old icloud id is still on my Ipad.

    ChrisJ4203,
    Thank you for the help.  Every app on my phone was downloaded using my old I-tunes ID.  I just hope that they will re-download under my new ID because I still can't change it on my phone.  In order to change to the new ID it says I have to sign out from the old ID and change to the new one.  My problem is that I don't remember my password to be able to sign out from my old ID.  Then the phone says it can change my password through e-mail and I  agree but I never get an e-mail at my old address or the new one.
    BHuyett

Maybe you are looking for

  • Prob in Career and Job in ESS

    Hi, I am facing a prob in Career and Job in ESS.i am not able to run any of its iviews in the backend.I do not have E-Recruit 3.0 installed in my server. According to note 766578, i can use some of the services of career and jod by adding tc to the a

  • InDesign CS2 PDF Export is Screened

    This problem just started happening to me last night.  All solids are appearing in PDFs as screened, however when I pull the PDFs I create into Illustrator to check them, they are fine.  Please help!  I usually export as press quality and a preset I

  • Toolkit.getDefaultToolkit().getScreenResolution()

    Hi I called Toolkit.getDefaultToolkit().getScreenResolution() to get my monitor screen resolution. It returns 96 dpi. But as i check my monitor hardware specs, I found it was different. My monitor is 15.1 inch MultiSync LCD1530v and the hardware spec

  • Delta data migration on SAP upgread from 4.6C to ECC 6.0

    Hi, We are planning for SAP upgrade in our Production environment and we are facing the below listed constraints and need your advice on the options to peform ECC Upgrade. 1) Present HW resource is already facing bottleneck and so no additional load

  • I get an error message: "The file you are trying to play has failed to finish downloading and can no longer play." What

    I get an error message for all the Apple tutorial videos:  The file you are trying to play has failed to finish downloading and can no longer play."  What is wrong and how can I fix it?