How to get Internal frames as well as a background image in a JFrame?

Hi All,
Here's my problem. I have a JFrame with a background image that I got by overridding the paintComponent() method of a JPanel and setting as the contentPane of a JFrame. Works great.
Now what I want is to use internal frames with this Frame a la JInternalFrame classes. But you need to create a JDesktopPane object and set this as the contentPane of the JFrame to get internal frames to work, right? Is there a way for me to have my cake and eat it so I get both internal frames and a background image? Thanks!

Hmmm,
so simple, why didn't I think of that? Damn Mondays!
thanks very much!

Similar Messages

  • How to get internal table from SAP Data Provider C#

    Hello.
    ABAP:
       DATA: lt_t001 TYPE TABLE OF t001.
       DATA: url(1000) TYPE c.
      SELECT * INTO TABLE lt_t001 FROM t001.
      CALL FUNCTION 'DP_CREATE_URL'
        EXPORTING
          type                 = 'APPLICATION'
          subtype           = 'X-R3TABLE'
        TABLES
          data                 = lt_t001
        CHANGING
          url                    = url
        EXCEPTIONS
          OTHERS           = 4.
    C#:
    using SAPDataProvider;
    using SAPTableFactoryCtrl;
    public void SetDataFromUrl(string url)
                SAPDataProviderClass p = new SAPDataProviderClass();
                p.SetDataFromURL("APPLICATION", "X-R3TABLE", url);
                ISapDPR3Table tbl = p.GetDataAsR3Table("APPLICATION", "X-R3TABLE");
                SAPTableFactoryClass tf = new SAPTableFactoryClass();
                Table tb = (Table)tf.NewTable();
                tb.ISAPrfcITab = tbl.DataTable; // Exception !!!!!!
    How to get internal table from SAP Data Provider ?

    Hi Sergey,
    I'm trying to do the same, have you found a solution to solved it?
    thanks for your help.
    Regards.
    Jonathan

  • How to display internal frame on click event from another internal frame

    hi me developing desktop application in netbean. i have some problem. plz reply me as soon as possible. feedback me on [email protected]
    1. I want to invoke an Internal Frame by click event that is in another internal frame. how i do it. I tried my best
    2. how can i call reports (ireports) from swing application

    Read the JInternalFrame API. You will find a link to the Swing tutorial on "How to Use Internal Frames" which contains a working example.

  • How do I create Equal Height Columns with my Background Images?

    Hi there,
    here is my page http://www.allthingsprintuk.co.uk/ATPHome.html
    My problem is that the side bar HTML list is coming off the page in IE. & also the html  in the header can look awful due to browser settings.
    My question is how do I create Equal Height Columns with my Background Images so that they fit with the HTML text? Is there a good link you can point me to, or a tutorial?
    The only way I can see by doing it is slicing my images up into 3 (top middle & bottom) & then setting the middle to repeat y????
    Or does anyone know of a way to create rounded corners WITH drop shadows in CSS that will work on all browsers?
    Thanks in advance
    Louisa

    Try these http://www.pixelan.com/

  • How to get the frame rate of my application

    Hi again...
    How can I get the frame rate of my application?
    I also want the frame rate value to be the title of the frame, updated every second. How do I do that?
    thanks in advance...

    To get the path where your application has been installed you have to do the following:
    have a class called "what_ever" in the folder.
    then you do a litte:
    String path=
    what_ever.class.getRessource("what_ever.class").toString()
    That get you a string like:
    file:/C:/Program Files/Cool_program/what_ever.class
    Then you process the result a little to remove anything you don't want:
    path=path.substring(path.indexOf('/')+1),path.lastIndexOf('/'))
    //Might be a little error here but you should find out //quickly if it's the case
    And here you go, you have a nice
    C:/Program Files/Cool_program
    which is the path to your application.
    Hooray

  • How to get the Frame size in H.263 by JMF ?

    Dear all,
    How to get the individual frame size in H.263 format if the H.263 file is a format of InputStream ???

    VideoFormat.getSize() returns a Dimension of a frame. H263Format is a subclass of VideoFormat. Guess you could get that object from getFormat() in your stream if it's a PullBufferStream. Or, with a Processor, you could do getTrackControls() and iterate through the TrackControl.getFormat()s until you find the VideoFormat.
    Suppose you could also get a FrameGrabbingControl, grab a frame and get the Dimension from him.
    --invalidname

  • How to get each frame Info in SWF ?

    Hi,all.
    I met a problem with SWF decomplie.
    If you have edited the fla files, store lots of frames which contains some shape information like pixels color, position and ect
    When you want to get that information in SWF, or rather, each frame information(like colors, pixels position), how to get that by AS3?
    Are there some ideas get frame info by AS3?

    Hi,all.
    I met a problem with SWF decomplie.
    If you have edited the fla files, store lots of frames which contains some shape information like pixels color, position and ect
    When you want to get that information in SWF, or rather, each frame information(like colors, pixels position), how to get that by AS3?
    Are there some ideas get frame info by AS3?

  • How to get Anchored Frame oversets

    Dear All
    I'm having one big problem regarding for the Anchores
    I'm having 10 pages with anchored Frames data's in the pages.
    Query:1
    How to collect all anchored Frames
    Query 2:
    How to get the Anchored Frames Overset checking
    Query 3:
    How to get the Anchored Frame page number
    //================================= Script ===========================//
    var myFrame = myDoc.textFrames;
        var myCharacter;
        var ParentTextFrame;
        var PageNumber;
        for(var imyFrm=0; imyFrm<myFrame.length; imyFrm++)
         myAnchStory = myFrame[imyFrm].parentStory;
         $.writeln("myAnchStory:"+myAnchStory);
           for(var iAnstry0; iAnstry=myAnchStory.texts[0].textFrames.length; iAnstry++)
             try
               if(myAnchStory.texts[0].textFrames[iAnstry].overflows == true)
                myCharacter = myAnchStory.texts[0].textFrames[iAnstry].parent;
                 ParentTextFrame = myCharacter.parentTextFrames[0];            
                 PageNumber = ParentTextFrame.parent.name;
                 $.writeln(PageNumber);
                // break;
              }catch(e)
    //============================= End of the Script ================================//
    But this scripts is working so many times... I dont know what I done the big mistake in this script.
    Please any one can suggest me the solutions.
    Thanks & Regards
    T.R.Harihara SudhaN

    Hi Harihara,
    You can also refer the below link for more details:
    http://forums.adobe.com/message/3209209#3209209
    Thanks,
    Praveen

  • How to get the frame position after being moved.

    I created a frame, after I moved it by my mouse, how can I get the new position?

    you could use getLocation() of a JFrame, maybe call it with a mouselistener or windowlistner.

  • How to make Internal Frame on Focus

    Hi All,
    i have an application where in i have a JInternalFrame within in A JFrame.
    Queries:
    1.I want to make JInternalFrame focused,(without clicking on any portoion of Internal Frame) once i run the apllication(java Demo)
    2.i want to fix the JInternal Frame.(Non movable)
    //Demo.java
    import java.io.*;
    import java.lang.*;
    import java.util.*;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;     
    import javax.swing.event.*;     
    import javax.swing.border.*;          
    public class Demo extends JFrame implements ActionListener {
    static JDesktopPane desk;
    String labelstr="Test ";
    JPanel contentpane;
    JLabel titlelabel;
    public Demo() {
              setTitle("Swing Test");
                    contentpane=(JPanel)getContentPane();
                    contentpane.setLayout(new BorderLayout());
                    desk=new JDesktopPane();     
                    desk.setBackground(Color.gray);
                    contentpane.add("Center",desk);
                    titlelabel=new JLabel(labelstr);
                    titlelabel.setForeground(Color.black);
                    titlelabel.setBorder(new BevelBorder(BevelBorder.LOWERED));
                    getContentPane().add(titlelabel,BorderLayout.SOUTH);            
              public void actionPerformed(ActionEvent e) {
                 public static void main(String args[]) {     
                    try  {
                      UIManager.setLookAndFeel(UIManager.getCrossPlatformLookAndFeelClassName());
                      //UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
                     }catch(Exception e) {
                                               System.out.println("Error loading L&F:"+e);     
                                               JOptionPane.showMessageDialog(null,e);
                    JFrame frame=new Demo();
                    frame.setSize(800,600);
                    frame.setVisible(true);
                      InternalFr jif=new InternalFr();
                      jif.start();
                    frame.addWindowListener(new CloseWindow());
           class CloseWindow extends WindowAdapter {
             public void windowClosing(WindowEvent we) {
                 Window w=we.getWindow();
                 w.dispose();
                 System.exit(0);
          }//InternalFr.java
    import java.io.*;
         import java.net.*;
         import java.lang.*;
         import java.awt.*;
         import java.awt.event.*;
         import javax.swing.*;
         import javax.swing.border.*;
         import javax.swing.text.*;
         public class InternalFr extends JInternalFrame {
             JLabel jlName, jlPass;
             static JTextField jtName,jtPass;
                 JButton submit,cancel;
            public InternalFr() {  
              super( "InternalFr");
              Icon img=new ImageIcon("Neticon.gif");
              setFrameIcon(img);
              JPanel contentpane=(JPanel)getContentPane();
               contentpane.setLayout(null);
              JPanel mainpanel=new JPanel();
              mainpanel.setLayout(null);
              mainpanel.setBounds(0,0,290,180);
              jlName=new JLabel("Username   :");
              jlName.setBounds(20,20,180,20);
              jlName.setForeground(Color.black);
              jtName=new JTextField();
              jtName.setBounds(150,20,100,20);
              mainpanel.add(jtName);
              mainpanel.add(jlName);
              jlPass=new JLabel("Password   :");
              jlPass.setBounds(20,50,180,20);
              jlPass.setForeground(Color.black);
              jtPass=new JTextField();
              jtPass.setBounds(150,50,100,20);
              mainpanel.add(jlPass);
              mainpanel.add(jtPass);
              JPanel buttonpanel=new JPanel();
              buttonpanel.setLayout(null);
              buttonpanel.setBounds(30,90,215,30);
              buttonpanel.setBorder(new EtchedBorder(EtchedBorder.RAISED));
              submit=new JButton("Submit");
              submit.setMnemonic('O');
              submit.setBounds(5,5,100,20);
              buttonpanel.add(submit);
              submit.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent ae) {
                 if(ae.getSource()==submit)  {
            cancel=new JButton("Cancel");
              cancel.setMnemonic('C');
              cancel.setBounds(110,5,100,20);
              buttonpanel.add(cancel);
              cancel.addActionListener(new ActionListener() {
                 public void actionPerformed(ActionEvent ae) {
                      Object obj=ae.getSource();
                     if(obj==cancel){
                          System.exit(0);
           contentpane.add(buttonpanel);
           contentpane.add(mainpanel);
        public void start()  {
             InternalFr at=new InternalFr();
             at.setSize(290,180);
            at.setLocation(220,150);
            at.setVisible(true);
            Demo.desk.add(at);
      }Thanks
    Mohan

    To give focus to an internal frame, do the following (where iFrame is your internal frame):try {
        iFrame.setIcon( false );  // In case it is minimized
        iFrame.moveToFront();     // Make sure it is in front
        iFrame.requestFocus();    // Ask for focus
        iFrame.setSelected( true );  // Select it
    } catch( java.beans.PropertyVetoException pve ) {
    }

  • How to get a movie to be loading in background?

    Hi, I posted this in the General forum, but it wasn't getting
    much interest. I'm hoping someone here can help.
    We're designing a portfolio site. It will have a fairly large
    amount of large bitmap images that need to look really good.
    I'll make another post to make sure I have the very best
    optimization techniques down. But to keep quality up, some movies
    may just end up being fairly large (though I'm not sure how 'large'
    is defined these days with broadband).
    - But I'm wondering if/how to have a movie(s) 'preload' in
    the background so that when it is called up, it is all or mostly
    loaded in the browser cache?
    Basically, we've divided each of the sections of the
    portfolio up into separate movies, with a various number of large
    images each. These are called up when you click their text link in
    the landing page area. I was hoping that as people hit the landing
    area and are reading the text or looking over the links, a couple
    of our larger-sized movies could be loading in the background so
    they don't have to wait as long if/when they click the link to that
    movie.
    Thanks. This is a bit new to me, so I want to make sure it's
    done as well and efficiently as possible. It needs to function and
    look very professional.

    Thanks for the reply.
    Just a couple questions for clarification.
    - Is loading these movies with an _alpha zero in our initial
    'landing page' movie (which does not have a preloader) going to
    cause this initial movie to have problems (with
    slowdowns/chunkiness)?
    - Are you saying to assign _alpha to the target within the
    initial 'landing page' movie or to the movie you are loading?
    - Any opinions on the efficiency differences between doing
    this with the _alpha or the _level commands?
    - Any other methods?
    Thanks again for the help!

  • How to get the local file system path of an image that loaded into the image component in cq5?

    Hi,
    I'm having hard time uploading image from filesystem where as drag and drop works.
    I'm not getting a path of image selected from filesystem.
    here is my code..
    private String populateImage() throws Exception {
                        if (currentNode != null && currentNode.isNode()) {
                                       Node ImageNode = JcrResourceUtil.createPath(currentNode, "image",
                                                                          null, "nt:unstructured", true);
                                       imageUrl = ImageNode.hasProperty("fileReference") ? ImageNode.getProperty("fileReference").getValue().getString() : "";
           imageUrl = imageUrl.trim();
            log.info("MANAGE PROFILE BEAN IMAGE URL INSIDE IF IS: " + imageUrl);
                        } else {
                                            imageUrl = properties.get("fileReference", "");
                                            imageUrl = imageUrl.trim();
                                            log.info("MANAGE PROFILE BEAN IMAGE URL INSIDE ELSE IS: " + imageUrl);
                        return imageUrl;
    So if I drag and drop..
    ImageNode.hasProperty("fileReference") is returning a valid path
    but if I upload an image  it is returning Null.
    So how to get the path? any suggestions around would be appreciated...

    When you say path you mean you want the path to print out in your HTML? Is that accurate? If so you generally need to constructe that path based on the path to the current component. So if you component is located at /content/mysite/en/about/mypage/jcr:content/parsys/image then the path to the image would generally be something like /content/mysite/en/about/mypage/jcr:content/parsys/image.img.jpg/1283829292873.jpg. The .img. selector triggers the servlet associated with the foundation parbase - /libs/foundation/components/parbase/img.GET.java. The reason you reference it this way is that there is no filesystem path to the image - it is stored in the repository not on the file system, and it requires a servlet or script to ge the binary from the repository and steam it.
    Normally the way you'd construct this is to use the out of the box Image class - so look at /libs/foundation/components/image/image.jsp. Now this example assumes that your component where you loaded the image extends /libs/foundation/components/parbase. If it doesn't then you either have to change your sling:superResourceType to /libs/foundation/components/parbase or some other component that does exten /libs/foundation/components/parbase.

  • How to get byte array from jpg in resource for Image XObject?

    Hi,
    Does anyone know how to get an array of bytes from a jpg from resource without an external library except MFC?
    The array of bytes is needed to create an Image XObject so it can be included in an appearance for an annotation.

    Sounds like a standard Windows programming question, not specific to the SDK.

  • How can I use a JPEG file as a background image for my vi in 8.5

    Im working on a vi that I plan on using as part of an alarm system.  I would like to use a JPEG file of my house as a background image for the vi, or possibly to just be displayed in a window on the control panel.  I have seen people use their own images before, but never looked at what this involved.
    Im trying to use the "read JPEG file" vi and the "draw flattened pixmap" vi to accomplish this.  The vi does run, but nothing shows on the front panel.  If I try to create an indicator from the "new picture" output of the "draw flattened pixmap" vi, I get an empty white window on the front panel.
    Any advice?
    Thanks
    Solved!
    Go to Solution.

    Guruthilak wrote:
    the earlier vi (using the JPEG) works fine. just increase the size of the picture control
    I figured this was the problem. And to the OP, I'm glad a bitmap worked, but no I didn't mean use any sort of LabVIEW programming at all. I meant open your image in Microsoft Paint, Press ctrl+A to select the whole thing. Then copy the image to the clipboard. Now select your front panel and press ctrl + v to paste it. No programming needed and the image is there. However, if you want to programmatically change it, you will need a picture control.
    CLA, LabVIEW Versions 2010-2013

  • I'm getting ugly vertical stripes at pictures and background images on my HTC One S.

    I like using Firefox on my HTC One S, syncing the browsing history and bookmarks really comes in handy.
    But however, sometimes i get ugly stripes above some images. When resizing the site, they sometimes disappear. It happens only with images and css-background images.
    A few screenshots: https://www.dropbox.com/sh/tq47ved3p1qe766/0KiMvzEHSD/screenshots/firefoxbug

    I think you can thank Apple for this.  See this discussion.
    Photoshop CC: MacOS 10.10 Yosemite: Graphics driver problem
    Nancy O.

Maybe you are looking for