How can I disable a JInternalFrame from being "restored"?

Sorry, I thought I should start a new thread for a new question.
With my JInternalFrame, I have it minimized initially when it is created. Now, how can I prevent the user from opening or "restoring" that frame? Basically, I just want the "title" bar to appear, and disable the frame from opening up.
thanks

try this
import java.awt.Dimension;
import java.beans.PropertyVetoException;
import javax.swing.JButton;
import javax.swing.JDesktopPane;
import javax.swing.JFrame;
import javax.swing.JInternalFrame;
import javax.swing.*;
import java.beans.VetoableChangeListener;
import javax.swing.event.InternalFrameAdapter;
import javax.swing.event.InternalFrameEvent;
import java.beans.PropertyChangeEvent;
public class DesktopPane extends JDesktopPane
implements VetoableChangeListener {
JInternalFrame jif;
JPanel p1;
public DesktopPane() {
p1 = new JPanel();
JButton b = new JButton("Test");
p1.add(b);
jif = new JInternalFrame("test1", true, false, true, true);
jif.getContentPane().add(p1);
jif.setVisible(true);
jif.setSize(new Dimension(200, 200));
add(jif);
jif.addVetoableChangeListener(this);
try {
jif.setIcon(true);
} catch (Exception ex) {
jif = new JInternalFrame("test2", true, false, true, true);
jif.getContentPane().add(p1);
jif.setVisible(true);
jif.setSize(new Dimension(200, 200));
add(jif);
jif.addVetoableChangeListener(this);
try {
jif.setIcon(true);
} catch (Exception ex) {
public void vetoableChange(PropertyChangeEvent evt) throws PropertyVetoException {
String property = evt.getPropertyName();
if (property.equals(JInternalFrame.IS_ICON_PROPERTY)){
boolean isIcon = ((Boolean)evt.getNewValue()).booleanValue();
if (!isIcon){
throw new PropertyVetoException("message", evt);
}

Similar Messages

  • How can I disable managed properties from being automatically generated in SharePoint 2013

    In SharePoint 2010 we had the option to turn this off for a crawled property category.
    How can we turn this function off in SharePoint 2013?

    Thanks Steve! That sure was not obvious... check, save, uncheck save... how did you figure that one out?
    Mike Smith TechTrainingNotes.blogspot.com
    Books:
    SharePoint 2007 2010 Customization for the Site Owner,
    SharePoint 2010 Security for the Site Owner

  • How can I disable my ipod from being controlled by others

    My brother has an iPhone 5 and he keeps restarting my whole iPod from his phone.  Does anyone know how to disable it or something that won't let him do that? And by restarting I mean he restarts it to a whole new iPod.

    He is probably using Find My iPhone app and you are probably on the same icloud account so he can restore it
    the app is here:
    https://itunes.apple.com/gb/app/find-my-iphone/id376101648?mt=8
    Turn off find my iphone by going into settings>icloud and then toggle find my iphone off
    http://support.apple.com/kb/PH2697
    Hope this helps

  • The windows of the Windows bar are already a form of tabs, so I don't need them in Firefox. How can I disable them completely from Firefox 23?

    RE: TABS ARE WINDOWS!
    The Windows bar already functions as a tab bar. Those tabs are called "windows." So, I find Firefox tab windows superfluous. How can I disable them completely from Firefox 23? I don't need what is essentially TWO windows bars covering up the entire width of my widescreen monitor's image! I already have a Windows bar at the bottom of my screen and, if I really wanted to, I could change ITS position to the top of the screen, so that it would LOOK like the Firefox tab windows bar. Firefox TABS are, essentially, a superfluous SECOND WINDOWS BAR.
    Here are my reasons for why I'd rather use Mozilla's Firefox, than Microsoft's Internet Explorer or Google's Chrome. I love and admire Firefox for Mozilla's intent on good security, for Firefox's Personas add-on, and for Firefox's free use of the Ad-Block add-on which, as you know, has the distinct virtue of reducing screen clutter--the last of which is my motive for wanting to get rid of the SUPERFLUOUS Firefox tabs "windows" bar. I am dreadfully sick of companies forcing miscellaneous bars (mostly representing marketing campaigns trying to sell me something) into my browser (and down my throat) every time I download something. (In case you haven't guessed, I am deliberately referring to your Firefox tabs bar as a "Firefox tabs 'windows' bar," because TABS are WINDOWS!)

    Let me clarify even more. The Firefox add-on you mention does not remove "tabs" windows. It only HIDES the "tabs" bar when there is only one "tab" in that window. It DOES NOT end "tabs." It does not turn "tabs" off.
    I know this, because, even with the add-on you recommend, the "tabs" bar often re-appears when I open a link, which--for some unknown reason--Firefox defaults to opening in a second "tab" within the same window, rather than putting it in a new Windows bar window. This, of course, disregards what I want to happen.
    I want to use my Windows bar to control my windows. I do not want my Firefox browser controlling my windows--which it calls "tabs." Can you tell me how to shut off "tabs?"

  • All my contact are being copied to my friend's iphone and i also am getting his contacts on my phone,when i delete a contact it also deletes it from his phone,we are sharing the same apple ID. How can i stop our contacts from being shared between us

    All my contact are being copied to my friend's iphone and i also am getting his contacts on my phone,when i delete a contact it also deletes it from his phone,we are sharing the same apple ID. How can i stop our contacts from being shared between us

    Everything that you have checked in your icloud settings will be shared between devices using the same Apple ID.  If you don't want icloud to share that information, then simply turn off that process under settings > icloud

  • How can i stop an email from being sent?  i cannot find an outbox in outlook

    How can I stop an email from being sent.  I cannot find an outbox in Outlook

    Outlook is a Microsoft product, I'd suggest posting on the Office for Mac Product Forums.

  • How can I stop my Apps from being automatically updated on my iPad2?

    How can I stopy my Apps from being automatically updated on my iPad2? I have an extremely slow wi-fi at work and my iPad Apps appear to be frozen as they are waiting to be updated. Help!

    In iTunes use the File menu "Transfer purchases from..." item. Ordinarily you will get a warning to do this before an update. Presumably your computer is authorized to use your account and it is the computer to which you normally sync your iPod?

  • How can I disable developers tools from using function keys?

    Every time I try to use my Quake like console binded to the F12 key, it opens the dev.Tools. How can I disable or even better uninstall dev. Tools.
    I don't want to change the key I use for my console, I want dev.tools to stop bothering me when I'm browsing the web, IT'S DISTURBING!!!
    Most people doesn't need dev tools, just put it as a plugin !!!

    Was eventually able to eliminate this problem by deleting the size entry in the devtools.toolbox.host using about config.
    At least it's invisible now instead of occupying half the page every time I hit F12.

  • How can you disable Adobe Reader from opening a file right after you save it as a pdf?

    Hi,
    I often save word files as pdf files and right after I save them as pdfs it opens the file in adobe reader. How can I disable this?
    Thanks

    Ahh, but that's the design function of any PDF viewer add-on to a browser.
    To avoid -- Use the browser feature that saves a file to the local machine.
    Then open the file with the appropriate application.
    If your machine/device does not support this then you'd want to change to one that supports what you want eh.
    Be well...

  • How to prevent an encrypted backup from being restored to a different device?

    If I force an employee to do an encrypted backup (which I can do with a configuration profile), and that employee is fired. We take back the company iphone, but they go and buy a personal one. They connect the new, personal iphone to itunes and do a restore of the encrypted backup (they know the password) and now they have all the work related stuff on their personal phones. Is there a way to prevent an encrypted back from being restored to a different device id.

    We require encryption of our employee backups as well...and the problem you mention is a real one.....
     If you use Exchange, you could disable Exchange Active Sync to prevent them from subsequently connecting to Exchange Server and getting new data with the new personal device....but you would still have the old data as part of the backup...the other issue is that we've found that the profile is part of the backup and if an employee leaves, even on good terms, if he wants to restore say, his music from the backup without the profile, it becomes quite awkward...the profile would have to be removed, ( which removes everything added with the profile, possible email and wi-fi), then the user could backup music etc  with iTunes, then return the corporate phone to be salvaged or re-deployed...and later put his personal data back on another device without the profile...if there is a way around the issue you bring up I'd like to know of it as well. .  Perhaps there is an MDM with functionality that would help here....that is one great strength of the Blackberry platform..all corporate data can be controlled from the BES server. 

  • How can I stop sound track from being divided when adding clips to other tracks in PrE12?

    The situation:
    I have a project with several minutes of video clips on the timeline (expert view) in "Video 1/Audio 1."  There is also music on the sound track (below the empty "Narration" track).
    Any time I make an edit to the Video 1 track, PRE cuts the Sound Track.  (Note that this is not the Audio 1 track, it's the sound track which is two tracks away.)  If I insert a clip, the Sound Track is cut and left with a gap.  Same if I do a FreezeFrame insert.  This is bad enough (make ten insertions, have the Sound Track chopped into ten separate pieces), but it gets worse: when I try to slide the Sound Track pieces back together, the Video 1 clips will be moved around.
    This appears to be a major bug but I'm hoping there is a simple way to deal with it.
    Here's what the Manual (p.71) has to say about it (not much).
    "When you insert a clip into the Expert view timeline, adjacent clips on all tracks shift to accommodate the new clip. By shifting all clips together, the audio and video of the existing clips remain in sync."
    * The question here is, adjacent to what?  The Sound Track is a continuous music clip of many minutes; it is alone on the Track, and there is nothing on the track above it (Narration track).  So it's not adjacent to anything, and yet it is being chopped up.
    The Manual continues:
    "Sometimes, you don’t want all clips to shift with each insertion. For example, when you add background music that superimposes the entire movie, you don’t want clips to shift."
    *They got that right, but they don't say anything about how to prevent it.
    This next makes no sense at all:
    "To shift specific clips togather, press the Alt key as you insert.  At a time, you can shift specific clips simultaneously on a maximum of two tracks.  These include the track receiving the insertion and the track containing the linked audio or video (if any). The affected tracks shift together, remaining aligned. The clips on other tracks are unaffected."
    *There is no mention of how to specify what clips would be shifted, or not.
    I'm not dealing with linked clips.  And they tell me how to shift clips (sort of) but nothing about how to stop clips from being cut up and shifted.  This all makes it very hard to create a coordinated product.
    Any suggestions or solutions will be much appreciated.

    Thanks, ATR,
    I wll try this--but I still am unclear on how to do what the Manual says is possible: select clips on another track that WILL be moved, if I so desire, so as to remain synched to the main Video track.
    UPDATE:
    In the case of inserting Freeze Frame, I just tried both Ctrl method and Alt method, and neither worked.
    1. Put Video on Vid1 track
    2. Put Music on Sound Track
    3. Ran a few seconds of Vid
    4. Stopped Vid, selected Freeze Frame
    5. Held down Ctrl key while clicking "Insert in Movie"  also tried with holding down Alt key.
    Result: a 3 second still was inserted int the Vid1 track.  A corresponding gap was created in the Sound Track.
    6. Slid the final part of the Sound Track to the left along the timeline to re-connect it to the next segment created by the above process.
    Result: the video following the final Freeze Frame was pushed to the right end of  Video1 track.
    7. Slid the Sound Track all the way to the left.
    Result: the entire Video 1 Track contents were pushed to the right and divided in pieces.
    I documented each step with screen shots which I can send if you want them and if I can figure out how to do it.
    UPDATE #2
    In the case of inserting a video clip to the Timeline, I just tried both Ctrl method and Alt method, and neither worked.
    1. Locate video in Project Assets
    2a. R click video in Project Assets (pull-down menu appears), hold down Ctrl, click Insert to Timeline.
    Result: Vid clip is inserted on Video 1 track, Sound Track is separated with a corresponding gap.
    2b.  R click video in Project Assets (pull-down menu appears), push Alt
    Result: pull-down menu disappears as soon as Alt is pushed down.
    I can stil drag the Vid clip but it's one more manual step...I love shortcuts!!

  • How can I prevent my images from being copied?

    This is a perennial question, but the simple answer is that you can't. It's impossible.
    Don't believe snake oil adverts for products that claim to prevent images from being copied. Once an image is displayed on a computer, there are numerous ways of copying it. "Solutions" that prevent users from right-clicking or pressing Print Screen can be disabled by turning off JavaScript in the browser; and screen grabbing software can easily make a copy of an image.
    If you want to show your photography on the web, but don't want others to steal your images, consider the following options:
    Add a watermark to your images.
    Embed copyright information in the metadata of your images.
    Save images at low resolution (72dpi is standard on the web, but useless for printing).
    The following image uses all three techniques:
    You can create a Photoshop action to watermark images. Use the File Info dialog box in Bridge CS4 to add copyright metadata to your images.

    I asked a question. Hans was kind enough to give me a solution, and for that I thank him! I have also learned a little more in the process!
    We have already established that the solution stops people right clicking on an image and saving the image (be it in Windows Explorer or not), but it has also been established that it is by no means a fool proof way of protecting images and that there are other ways of copying images from a webpage. However, it is another level of protection.
    Unfortunately, I do not want to watermark my images as I do not like looking as watermarked images myself. I also downsize my images for the web. I was just looking for another level of protection.
    Thanks for the input anyway!

  • How can I stop my contacts from being listed twice in my contact list?

    How can I stop contacts in my address book from being listed twice?

    That usually happens if you sync your contacts with both a supported application on your computer and over the air with Exchange or iCloud. You do one or the other, not both at the same time. You need to provide more info in order to suggest a solution.

  • How can I stop Compulations CDs from being broken up into multiple different Albums when imported into Itunes?

    I am currently using Itunes 10.6.1.7.  When I attempt to import my CDs, any that are Compulation Cds (with multiple artists), the CDs aren't being imported into the same folder and are broken into multiple listing in my Itunes library.
    How can change this so that they are imported only by Album?

    I think even using Get Info may not reveal the change, though it is possible the behaviour has altered since I last tested it. Playing or updating the tracks location in a script such as UpdateTagInfo seems to get iTunes to re-evaluate the tag.
    Assuming WMP is involved it may be best to make the necessary settings adjustments to prevent further changes, use the script to get all of the background changes exposed within iTunes, then correct as you see fit. Alternatively I do have another script called ExportImport that could be used to back up the current state of your tags (you should temporarily rename the media folder during the export phase), after which you would then run UpdateTagInfo and then use ExplortImport in its import mode to restore the corrupted data.
    tt2

  • How can I disable html5 videos from displaying on web pages?

    I use yahoo.com as my "news" page. In the last month or so there are more and more small format videos next to the new article. Used to be just a still pic, but now more "invasive". If I had my way I'd still click on "text only" like the old modem days. I want to READ an article, and I find the video images on their main page, before clicking on a story, to be distracting. Also, I'm on a limited data usage plan so don't appreciate them shoving data down my throat.
    Using Firefox 32.0 and Windows 8.1
    Yesterday I installed the "No Script" extension thinking I could block Just these videos, but doesn't seem to work that way. It blocks most everything including interactions like clicking on a button.
    If I examine the "object" (video) it appears to be an "html5" item. This seems to be something new from what I can google.
    There are a few help screens for html5, but these are "how do I play them" instead of "how can I block them".

    Try to set the media.autoplay.enabled pref to false on the <b>about:config</b> page.
    You can open the <b>about:config</b> page via the location/address bar.
    You can accept the warning and click "I'll be careful" to continue.
    *http://kb.mozillazine.org/about:config
    You can also see if this extension works (Flash Block is currently broken).
    *FlashStopper: https://addons.mozilla.org/en-US/firefox/addon/flashstopper/

Maybe you are looking for

  • When Editing A Web Page In Edge Animate, How Can I Embed Edge Elements Into Pre-Existing DIV's?

    I created a basic layout with some boxes in Dreamweaver. I set the Overflow property on them to "Hidden". I then opened the page in Edge Animate. However I noticed that when I import stuff, such as an image, then try to drag it into one of the existi

  • Transfer of stock between two storage locations within a plant in two steps

    Hi, We have a plant 6400 & we have two storage locations 6401 & 6402. Each storage location belongs to a department which are located at some distance from one another. The material to be moved from one storage location to another using a truck. For

  • No values in drop down when creating new parameter.

    Hi Everyone, I'm new to BOBJ and Crystal Reports and I'm just exploring these tools. I've installed BOBJ and Data Services and I've used those tools to pull the data into my SQL Server 2008 and create a Universe. Now I'm creating a report and I have

  • AxWindowsMediaPlayer problem with using subtitle sami.file in winform

    Hello every body I have a problem with using sami caption in axWindowsMediaPlayer; how can I use it? I used axWindowsMediaPlayer1.closedCaption.SAMIFileName="FileNameAddress"; and axWindowsMediaPlayer1.ShowPropertyPages();//and select sami file but i

  • RMI version problem

    Hi, I have a problem :D. In order to verify clients access to my application I have to use an RMI. The application server I'm running my app on has JVM 1.4 but the RMI is written in at least v5.0, it uses collection framework with abstract implementa