'Show JInternalFrame Contents While Dragging'

hi,
I have a question I have an application that has internal frames, Basically it is a MDI Application. I am using JDK 1.2.2 and windows 2000. The question is that when you go to the desktop right click properties and in Effects tab you uncheck the 'Show Window Contents While Dragging' checkBox. Now when I run my application and my parent window that is a frame pops up, if I drag the window i.e. my parent frame it doesn't dragg the contents onlt thw windows border is dragged, means it doesn't repaints that is fine. But when I try to drag one of the internal frame it shows me the contents inside the internalFrame being dragged too and I don't want to see these contents while internal frame is being dragged. So how can I make my application not to show the contents inside the JInternalFrames not to be shown while dragging the JInternalFrame. Any help is really appreciated.
for an example I have added a code example to see the effect that I got from the forums just for an example to show. If you have unchecked the option 'Show Window Contents While Dragging' in Effects tab when you go to the desktop right click properties and the Effects Tab or in the controlPanel dblClick Display and go to Effects tab and uncheck this checkBox. Now run this example and see when you drag the main window contents inside it including JInternalFrame doesn't get dragged just the boundry of the dragging frame is shown. Now if you try to drag the JInternalFrame. Contents inside that are dragged too. And I don't want this behavior. I don't want to see the contents.
/*************** MDITest ************/
import javax.swing.*;
* An application that displays a frame that
* contains internal frames in an MDI type
* interface.
* @author Mike Foley
public class MDITest extends Object {
* Application entry point.
* Create the frame, and display it.
* @param args Command line parameter. Not used.
public static void main( String args[] ) {
try {
UIManager.setLookAndFeel(
"com.sun.java.swing.plaf.windows.WindowsLookAndFeel" );
} catch( Exception ex ) {
System.err.println( "Exception: " +
ex.getLocalizedMessage() );
JFrame frame = new MDIFrame( "MDI Test" );
frame.pack();
frame.setVisible( true );
} // main
} // MDITest
/*********** MDIFrame.java ************/
import java.awt.*;
import java.awt.event.*;
import java.io.Serializable;
import javax.swing.*;
import javax.swing.border.*;
import javax.swing.event.*;
* A top-level frame. The frame configures itself
* with a JDesktopPane in its content pane.
* @author Mike Foley
public class MDIFrame extends JFrame implements Serializable {
* The desktop pane in our content pane.
private JDesktopPane desktopPane;
* MDIFrame, null constructor.
public MDIFrame() {
this( null );
* MDIFrame, constructor.
* @param title The title for the frame.
public MDIFrame( String title ) {
super( title );
* Customize the frame for our application.
protected void frameInit() {
// Let the super create the panes.
super.frameInit();
JMenuBar menuBar = createMenu();
setJMenuBar( menuBar );
JToolBar toolBar = createToolBar();
Container content = getContentPane();
content.add( toolBar, BorderLayout.NORTH );
desktopPane = new JDesktopPane();
desktopPane.setPreferredSize( new Dimension( 400, 300 ) );
content.add( desktopPane, BorderLayout.CENTER );
} // frameInit
* Create the menu for the frame.
* <p>
* @return The menu for the frame.
protected JMenuBar createMenu() {
JMenuBar menuBar = new JMenuBar();
JMenu file = new JMenu( "File" );
file.setMnemonic( KeyEvent.VK_F );
JMenuItem item;
file.add( new NewInternalFrameAction() );
// file.add( new ExitAction() );
menuBar.add( file );
return( menuBar );
} // createMenuBar
* Create the toolbar for this frame.
* <p>
* @return The newly created toolbar.
protected JToolBar createToolBar() {
final JToolBar toolBar = new JToolBar();
toolBar.setFloatable( false );
toolBar.add( new NewInternalFrameAction() );
// toolBar.add( new ExitAction() );
return( toolBar );
* Create an internal frame.
* A JLabel is added to its content pane for an example
* of content in the internal frame. However, any
* JComponent may be used for content.
* <p>
* @return The newly created internal frame.
public JInternalFrame createInternalFrame() {
JInternalFrame internalFrame =
new JInternalFrame( "Internal JLabel" );
internalFrame.getContentPane().add(
new JLabel( "Internal Frame Content" ) );
internalFrame.setResizable( true );
internalFrame.setClosable( true );
internalFrame.setIconifiable( true );
internalFrame.setMaximizable( true );
internalFrame.pack();
return( internalFrame );
* An Action that creates a new internal frame and
* adds it to this frame's desktop pane.
public class NewInternalFrameAction extends AbstractAction {
* NewInternalFrameAction, constructor.
* Set the name and icon for this action.
public NewInternalFrameAction() {
super( "New", new ImageIcon( "new.gif" ) );
* Perform the action, create an internal frame and
* add it to the desktop pane.
* <p>
* @param e The event causing us to be called.
public void actionPerformed( ActionEvent e ) {
JInternalFrame internalFrame = createInternalFrame();
desktopPane.add( internalFrame,
JLayeredPane.DEFAULT_LAYER );
} // NewInternalFrameAction
} // MDIFrame
I'll really appreciate for any help.
Thank you

try this:
JDesktopPane desktopPane = new JDesktopPane();
desktopPane.putClientProperty("JDesktopPane.dragMode", "outline");Both parameters passed to 'putClientProperty' must be strings.
Hope this helps
Riz

Similar Messages

  • Disabling 'Show window contents while dragging' also disables window snap - is there a workaround?

    When I disable 'Show window contents while dragging' in Performance Options, it also automatically disables the ability to snap windows the left and right and corners by dragging them. I have an older computer, and disabling this really improves the performance,
    but I'd really like to keep the ability to snap the windows around, as it's one of my favorite features.
    Is there a way to just disable showing window contents while dragging without disabling the window snap feature?

    Hey there. I've been trying to figure out why my snap wasn't working, and this is the only post I've found that mentioned it.
    I found snap wasn't working on my machines sometimes and realised it happens after I start an RDP session which disables the "show window contents while dragging" option, but then doesn't seem to enable it properly after the session ends.
    When I check the option, it is already ticked, so I need to untick and re-tick, then apply and snap starts working again.
    I don't know if there is any connection with the "Prevent windows from being automatically arranged when moved to the edge of the screen" option under the mouse ease of access settings.
    It does seem like a new issue though as it doesn't happen under Win8

  • Show Windows contents while dragging disabled after standby

    I have noticed that the option "Show windows contents while dragging" gets disabled after I close the lid to put the machine into standby (hibernation disabled) and then open it again. Does anyone know what to do in order do disable that annoying feature?

    The way to solve this problem, is demonstrated by the following code:
    JDesktopPane desktopPane = new JDesktopPane();
    desktopPane.putClientProperty("JDesktopPane.dragMode", "outline");This will then set all of the internal frames to outline mode when the frames are dragged instead of sluggishly drawing the components with the internal frames when dragged.
    Hope this helps
    Riz

  • Xcode - show contents while dragging, scrolling

    I have a new 13" rMBP with Xcode installed. So far no problems, except...
    there is no animation when I drag items, or scroll or resize the application. For example, when I scroll a list inside Xcode, the cusor moves but the list doesn't move until I stop scrolling. Also, if I drag a button it doesn't show up under my cursor and move with it. Instead it appears only after I place it. Additionally, if I resize or move the Xcode window, it doesn't show it moving with my cusor. It only updates its position after I stop moving.
    And to be clear, I'm refering to the Xcode application, not one built with it.
    Any ideas on how to fix this?
    All other programs behave fine.
    Thanks

    The way to solve this problem, is demonstrated by the following code:
    JDesktopPane desktopPane = new JDesktopPane();
    desktopPane.putClientProperty("JDesktopPane.dragMode", "outline");This will then set all of the internal frames to outline mode when the frames are dragged instead of sluggishly drawing the components with the internal frames when dragged.
    Hope this helps
    Riz

  • CS6: How to display image contents while dragging/resizing?

    CS6 Illustrator, Windows 7 64bit
    Hello all,
    I'm a IT tech trying to help out one of my users, so I am not proficient in Illustrator by any means. With that being said, I was wondering if there is a way to display the contents of an image while you are dragging or resizing the image?
    Thanks, Shaun

    It should already show the outline of all the shapes while moving or resizing. As far as I know, you can't see the full color image while doing transformations. It would be unusably slow for some images.

  • Hide Window Contents While Dragging in OB3?

    I know it was possible with OB2 (session.screen0.opaqueMove: False) but is there a hidden command somewhere that does the same thing in OB3?
    Maybe it has something to do with the <drawContents> command?
    Thanks.

    hi
    I am sorry my description was not so precise as it should be.
    Our applications use MDI window system manager where the document windows always are displayed within the MDI application window frame.
    An Application window is OK. Problem is with the document windows.
    Only a frame of a document window is moving while I am dragging it to some other position by the mouse.
    The content of the window appears at the new position when a mouse button is released.
    This behaviour is new for me at web based forms. The same operation acts differently at the old application (client/server forms 6i).
    A dragged document window is moved with its content.
    regards
    Petr

  • Trackpad pointer will not show content while hovering, sometimes it's a hand, somethimes its an arrow, and other times it's a line. Also cant highlight anymore.

    Trackpad pointer will not show content while hovering over the item. Sometimes the pointer is a hand, sometimes it's an arrow, and other times it's a line. Also can no longer highlight, or drag.

    Most commonly used backup methods
    then
    Step by Step to fix your Mac

  • How to show MouseOver effect on dropable region while dragging a MovieClip?

    Hello friends,
    I am creating Drag and drop flash application.
    While dragging an instance of a movieclip I want also the dropable region to show effect like MouseOver case.
    So that end user can confirm that they are dropping the item in right region.
    Here the mouse is moved while it is kept clicked
    Plz help me,
    Thanks.
    Venkat

    Thanks for taking interest.
    I did the first part of your reply already, but  How to check if a MovieClip is being dragged?
    Say, I have two MovieClips
    TargetToDrop_mc
    DropableRegion_mc
    TargetToDrop_mc.addEventListener(MouseEvent.MOUSE_DOWN, gotMouseDown);
    TargetToDrop_mc.addEventListener(MouseEvent.MOUSE_UP, gotMouseUp);
    TargetToDrop_mc.addEventListener(MouseEvent.MOUSE_OVER, gotMouseOver);
    TargetToDrop_mc.addEventListener(MouseEvent.MOUSE_OUT, gotMouseOut);
    DropableRegion_mc.addEventListener(MouseEvent.MOUSE_DOWN, gotMouseDown);
    DropableRegion_mc.addEventListener(MouseEvent.MOUSE_UP, gotMouseUp);
    DropableRegion_mc.addEventListener(MouseEvent.MOUSE_OVER, gotMouseOver);
    DropableRegion_mc.addEventListener(MouseEvent.MOUSE_OUT, gotMouseOut);
    function gotMouseDown(EventReceived:MouseEvent):void {
        EventReceived.currentTarget.startDrag ();
    function gotMouseUp(EventReceived:MouseEvent):void{
        EventReceived.currentTarget.stopDrag();
    function gotMouseOver(EventReceived:MouseEvent):void{
        EventReceived.currentTarget.alpha=0.5;
    function gotMouseOut(EventReceived:MouseEvent):void{
        EventReceived.currentTarget.alpha=0.7;
    Now plze guide me on basis of above.
    Thanks,
    Venkat

  • How to show large images along with cursor while dragging ?

    Hi Friends,
    While dragging images, image has to be shown along with cursor. In normal dragging process, only (32, 32) size of the original image size only appears.
    But in my application, I need to show image with its original size along with cursor while dragging. So i need an application (program) or
    suggestions which can meet the above requirement. It is an urgent issue for me. Any help in this regard is highly appreciated.
    Thanks in advance,
    Sunil

    Learn to search the forums before asking. This is such a recent posting.
    [http://forums.sun.com/thread.jspa?threadID=5346407]
    db

  • How to store movie contents while keeping same music library

    Pretty much what i wanna do is that to save music in my computer but keep my movie contents in external hard drive. How do i do this?
    Thanks in advance

    Put the movies on the external drive.  Hold down the option key while dragging them to an iTunes window which will leave the files where you put them. Of course the movies will show as broken links iif you do not have the external turned on when starting iTunes, but the links will repair themselves if you turn on the drive and restart iTunes.
    My preferred method is to make a separate library for movies and store this on the external drive.  To do that, start iTunes with the option key held down.

  • FILE UPLOAD PROBLEM SHOWING THE CONTENTS IN THE SAME BROWSER WINDOW

    Hi,
    This is amit Joshi
    I have uploaded content using input tag of type file and posted to jsp as multipart/form-data type
    in that jsp i am using following code to display the content in browser but only first content is displayed How can i modify it to show all content in the file ..
    <html>
    <head>
    <title>File Upload Display</title>
    </head>
    <body>
    <%
    //ServletOutputStream sout=response.getOutputStream();
    StringBuilder strBuilder = new StringBuilder();
    int count=0;
    String f;
    f=request.getParameter("filedb");
    DBManager dbm = new DBManager();
    //dbm.createTable("mms3");
    //log.info("In JSP : "+ f);
    //dbm.insert_data(f,"mms3");
    %>
    <%
    if (ServletFileUpload.isMultipartContent(request)){
    ServletFileUpload servletFileUpload = new ServletFileUpload(new DiskFileItemFactory());
    List fileItemsList = servletFileUpload.parseRequest(request);
    strBuilder.append("<?xml version=\"1.0\" encoding=\"UTF-8\" ?>").append('\r').append('\n').append("<xpage version=\"1.0\">").append('\r').append('\n');
    String optionalFileName = "";
    FileItem fileItem = null;
    Iterator it = fileItemsList.iterator();
    ServletOutputStream outputStream=null;
    while (it.hasNext()){
    FileItem fileItemTemp = (FileItem)it.next();
    if (fileItemTemp.isFormField()){
    %>
    <b>Name-value Pair Info:</b>
    Field name: <%= fileItemTemp.getFieldName() %>
    Field value: <%= fileItemTemp.getString() %>
    <%
    if (fileItemTemp.getFieldName().equals("filename"))
    optionalFileName = fileItemTemp.getString();
    else
    fileItem = fileItemTemp;
    if (fileItem!=null){
    String fileName = fileItem.getName();
    %>
    <b>Uploaded File Info:</b>
    Content type: <%= fileItem.getContentType() %>
    Field name: <%= fileItem.getFieldName() %>
    File name: <%= fileName %>
    <%
    if(fileItem.getContentType().equals("image/jpeg")) { %>
    File : <p><%
         //response.setContentType("image/gif");
         byte[] bArray=fileItem.get();
         response.setContentType("image/jpeg");
         outputStream=null;
         outputStream= response.getOutputStream();
         outputStream.write(bArray);
         outputStream.flush();
         outputStream.close();
    else if(fileItem.getContentType().equals("text/plain"))
         %> File : <%= fileItem.getString() %>
    <%
    byte[] bArray=fileItem.get();
    response.setContentType("text/plain");
         outputStream = response.getOutputStream();
         out.println();
         outputStream.write(bArray);
         outputStream.flush();
         outputStream.close();
    %> </p> <%
    %>
    </body>
    </html>
    Edited by: Amit_Joshi on Nov 13, 2007 10:58 PM

    Well Well Well..
    That would not work...
    What you have to do is save the uploaded file content on to a location and then pass the fileName as a request parameter to a deidicated which displays the contents of that file.
    Just as an example
    <html>
    <head>
    <title>File Upload Display</title>
    </head>
    <body>
    <%
    //ServletOutputStream sout=response.getOutputStream();
    StringBuilder strBuilder = new StringBuilder();
    int count=0;
    String f;
    f=request.getParameter("filedb");
    DBManager dbm = new DBManager();
    //dbm.createTable("mms3");
    //log.info("In JSP : "+ f);
    //dbm.insert_data(f,"mms3");
    %>
    <%
    if (ServletFileUpload.isMultipartContent(request)){
    ServletFileUpload servletFileUpload = new ServletFileUpload(new DiskFileItemFactory());
    List fileItemsList = servletFileUpload.parseRequest(request);
    strBuilder.append("<?xml version=\"1.0\" encoding=\"UTF-8\" ?>").append('\r').append('\n').append("<xpage version=\"1.0\">").append('\r').append('\n');
    String optionalFileName = "";
    FileItem fileItem = null;
    Iterator it = fileItemsList.iterator();
    ServletOutputStream outputStream=null;
    while (it.hasNext()){
       FileItem fileItemTemp = (FileItem)it.next();
    %>
    Name-value Pair Info:
    Field name: <%= fileItemTemp.getFieldName() %><br/>
    Field value: <%= fileItemTemp.getString() %><br/>
    <%
    if (fileItemTemp.getFieldName().equals("filename"))
        optionalFileName = fileItemTemp.getString();
    if(!fileTempItem.isFormFiled()){
       String fileName = fileItem.getName();
       fileItem.write(optionalFileName);
    %>
    Uploaded File Info:
    Content type: <%= fileItem.getContentType() %><br/>
    Field name: <%= fileItem.getFieldName() %><br/>
    File name: <%= fileName %><br/>
    <%
    if(fileItem.getContentType().equals("image/jpeg") || fileItem.getContentType().equals("image/pjeg")) {
    %>
      <img src="FileServlet?fileName=<%=optionalFileName%>"   
    <%
    %>
    </body>
    </html>a sample code snippet for FileServlet.
    String fileName =  request.getParameter(fileName);
      File file = new File(fileName);
       if(!file.exists())
         return;
      // If JSP
      String mimeType = application.getMimeType("fileName");
           If you are using servlet
           String mimeType = this.getServletContext().getMimeType(fileName);
         response.setContentType(mimeType);  
         response.setHeader("Content-Disposition","inline;filename=\\"+fileName+"\\");
      BufferedOutputStream out1 = null;
      InputStream in = null;
      if(mimeType == null)
         mimeType = "application/octet-stream";
      try{
         in = new FileInputStream(f);
         response.setContentLength(in.available());
         BufferedOutputStream out1 = new BufferedOutputStream(response.getOutputStream(),1024);
         int size = 0;
         byte[] b = new byte[1024];
         while ((size = in.read(b, 0, 1024)) > 0)
            out1.write(b, 0, size);
      }catch(Exception exp){
      }finally{
          if(out1 != null){
             try{
                out1.flush();               
                out1.close();
             }catch(Exception e){}
          if(in != null){
            try{in.close();}catch(Exception e){}
      } Hope that might answer your question :)
    However,this is not the recommended way of doing this make use of MVC pattern.Would be a better approach.
    you might think of googling on this and can findout what is the best practise followed for problems of this sort
    REGARDS,
    RaHuL

  • I am trying to Show Package contents of iMovie and it freezes at the hr.lprog folder

    While doing a virus scan my machine would freeze on the file
    Applications/iMovie/Contents/Resource/hr.lprog/Title-SidewaysDrifting.nib/keyedo bjects.nib.
    Bitdefender said to send them the file.
    I am able to "Show package contents" of iMovie, and open the Contents and Resources folder. When I try to open the hr.lprog folder, I get the spinning beach vball of death and I have to reboot my machine using the power button.
    Does anyone have an idea what might be causing this and how to fix it?
    Is the hr.lprog folder just the language files for Croatia? If so, can I safely delete them, or is there more to it?

    My guess would be that your hard drive has become corrupt, and the corruption is affecting something about that folder or its contents such that when the Finder tries to display them, it crashes. I would recommend immediatelyrepairing with Disk Utility. Also, if you don't have any backups, now would be a good time to start, before something bad happens.
    If repairing the hard drive doesn't work, I would try deleting and reinstalling iMovie.
    Also, note that I don't recommend BitDefender. Read my Mac Malware Guide, and if after reading that you want to have anti-virus software, use one of the programs it recommends. BitDefender has performed poorly in my anti-virus software testing, both in the first round and the second round of testing.

  • Window blank when I click "Show Package Contents" in Pictures folder

    Long story short, I have two iPhoto libraries - one on an old laptop and one on a new MacBook Air (10.6.4). I have been trying to copy the old iPhoto library from the old laptop to the new laptop (so that I would be able to access both libraries on the new laptop by holding down option when starting iPhoto and selecting one or the other).
    I copied the old iPhoto library into the "Pictures" folder on the new laptop. Then I did some ill-advised tidying up (I know, I know, I'm an idiot) in that "Pictures" folder. As I understand it, inside "Pictures", there should be an "iPhoto Library" folder but that has now gone. In fact, there is nothing in "Pictures" at all. When I right click on "Pictures" and select ""Show Package Contents" I get a blank window.
    I have the two iPhoto libraries (old and new) elsewhere on my hard drive - in a folder I created in the home directory ("Pictures 2" > "iPhoto Library"). iPhoto can read the two libraries from there no problem. But I cannot drag and drop the libraries into the "Pictures" folder, where they should be, because I get an error message: "You can’t open the application “Pictures” because it may be damaged or incomplete". When I click on "Pictures", it doesn't open in Finder but iPhoto opens up showing whatever library I used last.
    Someone on the iPhoto forum suggested that I post this problem here: "That sounds very like the Pictures Folder has had it's Execute bit set and the Mac now thinks it's an application. The solution to this is a trip to the Terminal. Post this here: http://discussions.apple.com/forum.jspa?forumID=1339 and someone will give you the Terminal commands to fix that." So I'm hoping that someone here can help me out!
    Let me know if you need any further info. The other thread is here:
    http://discussions.apple.com/thread.jspa?messageID=11958853#11958853
    Many thanks.

    I'm having the same exact problem. I have an older macbook pro and I was trying to copy the iphoto library to my new imac. I was stupidly messing around with the pictures folder on the comp when things weren't migrating correctly, then it suddenly changed from a folder to a package and I got the same error when I tried to delete. Any suggestions?

  • How do I stop firefox from showing mobile content on my desktop

    I was wondering if anyone could assist me with this problem. Firefox shows mobile content on my desktop (such as going to Yahoo Sports page) instead of desktop content on my desktop. I have tried clearing cookies and c ache, and that has not solved my problem. Thanks in advance!

    Oh, Yahoo! might have stored its decision in a cookie, or in a cached file. You probably need to clear those again. You've done it before, but just for reference:
    (1) Bypass Firefox's Cache
    Use Ctrl+Shift+r to reload the page fresh from the server.
    Alternately, you also can clear Firefox's cache completely using:
    orange Firefox button (or Tools menu) > Options > Advanced
    On the Network mini-tab > Cached Web Content : "Clear Now"
    If you have a large hard drive, this might take a few minutes.
    (2) Remove the site's cookies (save any pending work first). While viewing a page on the site:
    * right-click and choose View Page Info > Security > "View Cookies"
    * Alt+t (open the classic Tools menu) > Page Info > Security > "View Cookies"
    Then try reloading the page. Does that help?

  • I have one out of five email address's with coxmail that opens with a blank inbox but other browsers show the content of the same inbox

    Question
    I have one out of five email address's with coxmail that opens with a blank inbox. Other browsers like opera or IE show the content of the same inbox. I've contacted cox but they tell me the problem is on my computer. I've used three different anti virus/malware scanners to eliminate all the bugs they can find. I need a firefox guru with suggestions. Thanks, Charles

    You can undo your permission changes. Probably the most relevant one is cookies. Try one or both of these methods:
    (1) Page Info > Permissions tab
    While viewing a page on the site:
    * right-click and choose View Page Info > Permissions
    * Alt+t (open the classic Tools menu) > Page Info > Permissions
    (2) about:permissions
    In a new tab, type or paste '''about:permissions''' and press Enter. Allow a few moments for the list on the left to populate, as this information needs to be extracted from a database.
    Then type or paste ''rcn''' in the search box above the list to filter it to the most relevant domains. When you highlight a domain, you can adjust its permissions in the right pane.
    Any luck?

Maybe you are looking for

  • My mac connects to my airport extreme but not my iPhone or iPod Touch? I have tried to reset it but still nothing

    I need help! My airport has recently decided to not connect to my ipod touch or iphone 4s It will however still connect to my macbook pro, and ipad 2 If anyone could tell me what to do to fix this i would be greatful I have hard reseted it, restored

  • Help with writing a batch file

    Hi : does anyone know anyplace online that I can get help in writing batch files?? I have never worked much with batch files before.... any help is greatly appreciated thnx

  • Tiger and using FrontRow On External Display

    Looking for a way to use FrontRow so that it comes up on my TV. So far the only easy way I have come up with is to use Mirror mode, but that does not support the native display or settings of my TV like it does when spanning. I tried TVRow but that r

  • Enable the security configuration for this panel

    Why do my panels built with Configurator sometimes display this in Ps Cs4? "Please close all panels or restart Photoshop to enable the security configuration for this panel" Closing panels or restarting Photoshop does not enable the panels but export

  • RichTextBox Binding to a String or something else

    Hello. First, I'am from Germany and I have to learn english and this is the reason, why I wrote my question in english. My problem is: I want to bind a RTF to a String or something else, to work with the informations in behind code. But after I searc