Renaming the title of a frame from a panel

Hi,
I've searched the forum but I could not find anything that help me...
I want to change the title of Main(a class that extends JFrame) from MainPanel(a class that extends JPanel)
somewhere in my MainPanel I use:
((Main)getParent()).setTitle("A new Title...");Idont have any compiling error, but I get an exception
Exception in thread "AWT-EventQueue-0" java.lang.ClassCastException: javax.swing.JPanel
        at mw_recipebook.MainPanel.actionPerformed(MainPanel.java:173)
        at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1849)
        at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2169)
        ...I've used succesfully the method:((aClass)getParent()).aMethode();before, when using from a childPanel to call a methode in it's parentPanel, but from panel to frame it does not work.... help! How do I do that?
Thank's

... or else you can try this:
( (JFrame)getRootPane().getParent()
).setTitle("Title");
thank's allot
I tought of getRootPane(), but not getRootPane().getParent()

Similar Messages

  • Hello, I need some help on renaming the title on mi web pages!

    Hello, I need some help on renaming the title on mi web pages! appear to be locked by the template and I would like to know if is posible rename each page with diferent title? Thanks,

    @ Gary: No, there is no need to specify an editable region in the page title.
    If you make a template from a page, by saving it as a template (using "save as template"), the page title is automatically made editable.
    @ Jesus: if you look into the code of your template or of any childpage, it should read like this:
    <!-- TemplateBeginEditable name="doctitle" -->
    <title>Mi PageTitle</title>
    <!-- TemplateEndEditable -->
    meaning that the page title is indeed editable.
    If it does not look like this, something went wrong.
    Maybe do a little test, save your page as a template and see if the code reads as above.
    It is important that you keep your templates in the Templates folder in your root folder
    Do not move the folder or change its name, otherwise it will not work.

  • Can I change the title of my book from govtapo ship to big brothers money?  how do i do it?

    Can I change the title of my book from Govtapo Ship to Big Brother's Money?  How do I do this in iBookstore? 

    Hi,
    You need to change the song title in iTunes. This will also change the file name.
    Jim

  • How to call a class that extends a frame from a panel ?

    How to call a class that extends a frame from a panel ?
    I am trying to create an application say "Videoshow"
    Videoshow has a panel which in turn consists of 2 components : 1]a textarea( to show the contents of a page) and 2] a mediaclip(to show the video).
    Now I have an application "MediaApplication"(to show the videoclip) which extends Frame (Code from Java 2 Unleashed, Chap 21). I want to show this MediaApplication in Component 2 of the above panel. But when I do this, I only see the MediaApplication frame instead of the whole SlideShow.
    I want to do something likethis.
    VideoShow :
    |---------------------------------|-------------------|
    | |
    | (Comp 1) | (Comp 2)
    | TEXTAREA | Video Clip
    | |(MediaApp entends Frame)
    |---------------------------------|-------------------|
    What is the best way to achieve this ? Also which component can I use to show the videoclip ?

    im not familiar with the code you mention from Java 2 Unleashed, but your best bet is to read up on Swing a bit - so you get an idea of how Swing containers and components work - then im sure you'll find a solution to your problems. Then if you encounter any difficulties whilst your attempting to do that, post your code in the Swing forum and im sure someone will help you.

  • Rename the title of an tabstrip of an overview page

    Hi all together,
    I have an overviepage (shown as a view with tabstrips) and I need to rename one of these tabstrips at runtime.
    I tried to redefine IF_BSP_WD_HISTORY_STATE_DESCR~GET_STATE_DESCRIPTION of this view but this method is never called.
    Do you have any other suggestions???
    Thanks,
    TW

    You cannot rename the PDF files in the iBooks app on the iPad. In theory, this should work (copied from another discussion)
    If the PDFs appear in iTunes (they would be in the Books section of the iTunes Library) then you can change the title by selecting each PDF, File->Get Info from the main menu and change the Name in the Info tab.  Then sync the newly titled PDFs back to the iPad.
    If that does not work, you could copy the PDF files to your hard drive, rename them on the computer - but not within iTunes, drag them back into your iTunes library, and then sync again.
    I really don't know of a shorter or more direct way of renaming the files. You may be able to rename PDF files in apps that let you edit or annotate PDF files, but I don't have any of those apps, so I can't speak with any certainty about it.

  • How can I rename the title of an ibook?

    Ibook is a nice app. unfortunately i cannot rename the titels of pdf files, which are listed in my ibook. How does that work ?
    Thank for the help.

    You cannot rename the PDF files in the iBooks app on the iPad. In theory, this should work (copied from another discussion)
    If the PDFs appear in iTunes (they would be in the Books section of the iTunes Library) then you can change the title by selecting each PDF, File->Get Info from the main menu and change the Name in the Info tab.  Then sync the newly titled PDFs back to the iPad.
    If that does not work, you could copy the PDF files to your hard drive, rename them on the computer - but not within iTunes, drag them back into your iTunes library, and then sync again.
    I really don't know of a shorter or more direct way of renaming the files. You may be able to rename PDF files in apps that let you edit or annotate PDF files, but I don't have any of those apps, so I can't speak with any certainty about it.

  • Changing the titles of all frames in a running application

    Hi All,
    I've got a 50+ frame application. I have realized that I need to update the frame titles for all the frames based upon some event that can be initiated by any of the frames. Each frame title will be different but will incorporate a bit of knowledge about the event. (Note that when I use the term "event", I'm using it in the normal English language sense, not a Java language sense!)
    I've been considering a few approaches and most look either stupid or a whole lotta' work! I'm looking for how to do this the "right way." ...I don't have a broad enough experience to know what's "common" regarding application architecture, but here's what I've got:
    A "Master" class kicks things off. It instantiates a few things like a database connection and so forth, and then it starts a MainFrame that appears on the users screen. The MainFrame, and all of its children, are actually of a class that's an extension of JFrame.
    It's my supposition that I'd like to create some kind of frame pointer holder in the Master, and all frames "register" themselves. When an event occurrs that warrants changing the frame titles, the Master walks the collected frame pointers and directs the titles be changed, as appropriate. ...OR... Is there already a collection of "children" of the master? How would I get that list and how would I walk it looking for a frame?
    Another idea is to be able to send some kind of notification to each frame and say, "Go Update Your Title!"
    Example code GREATLY appreciated!
    Thanks much,
    Richard

    ... While looking into doing this EventObject thing, I noticed that EventObjects are a heavyweight version of what I want... What it really boils down to is:
    Master defines:
    private static Master M = null;
    Vector myChildren = new Vector();
    Then in the constructor:
    M = this;
    Then in a method:
    Vector v = (Vector)myChildren.clone;
    for (int i=0; i<v.size(); i++;)
    ((JFrame)v.elementAt(i)).updateTitle();
    In each JFrame (in my case, in the class that extends JFrame):
    M.addElement(this);
    and in the right place
    M.removeElement(this);
    Oh yeah, and don't forget a method to set the frame title!...
    public void updateTitle()
    this.setTitle("whatever");
    ...That's it! WAY easier than all that foolishness with declairing your own event listeners and everything... For my needs, this was the way to go!
    Regards,
    Richard

  • How can I change the title of a song from the finder menu?

    I need to chnage the title of a song (not on iTunes) so It will works with any software I use to listen music.
    I can change the file name but then when i play on itunes i still see "track 14" ?
    How can I do It?

    Hi,
    You need to change the song title in iTunes. This will also change the file name.
    Jim

  • How can i hide( close or exit) the windows media player window from front panel after a video is played.

    I want a video to be played when i star executing a vi. After that i want to remove(hide or close) the media player window from my front panel.how can i do this?
    the vi is attached.
    Electronics and Instrumentation Engineer
    Freelance LabVIEW and Arduino programmer.
    For projects contact me ; [email protected]
    Solved!
    Go to Solution.
    Attachments:
    videovi.vi ‏9 KB

    Check out the attached code.
    If it solves your problem then dont forget to mark this as a solution. Also if you like the answer dont forget to give me kudos
    Tushar Jambhekar
    [email protected]
    Jambhekar Automation Solutions
    LabVIEW Consultancy, LabVIEW Training
    Rent a LabVIEW Developer, My Blog
    Attachments:
    Main.vi ‏14 KB
    MediaPopup.vi ‏21 KB

  • Renaming the song title by right click -- Get Info. But no longer able to do so.

    I used to rename the songs in my iTunes from my PC while it was connecting to my iPhone by right click and Get Info. But I am no longer able to do that. When I right click, the Get Info part seems to be disabled for editing? Why is it so?

    Many site issues can be caused by corrupt cookies or cache. In order to try to fix these problems, the first step is to clear both cookies and the cache.
    Note: ''This will temporarily log you out of all sites you're logged in to.''
    To clear cache and cookies do the following:
    #Go to Firefox > History > Clear recent history or (if no Firefox button is shown) go to Tools > Clear recent history.
    #Under "Time range to clear", select "Everything".
    #Now, click the arrow next to Details to toggle the Details list active.
    #From the details list, check ''Cache'' and ''Cookies'' and uncheck everything else.
    #Now click the ''Clear now'' button.
    Further information can be found in the [[Clear your cache, history and other personal information in Firefox]] article.
    Start Firefox in Safe Mode to check if one of the extensions (Firefox/Tools > Add-ons > Extensions) or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox/Tools > Add-ons > Appearance).
    <b> To Enable SafeMode </b>
    *You can open Firefox 4.0+ in Safe Mode by holding the '''Shift''' key when you open the Firefox desktop or Start menu shortcut.
    * Or open the Help menu and click on the '''Restart with Add-ons Disabled...''' menu item while Firefox is running.
    *''Once you get the pop-up, just select "'Start in Safe Mode"''
    If it works in Safe Mode and in normal mode with all extensions (Tools > Add-ons > Extensions) disabled then try to find which extension is causing it by enabling one extension at a time until the problem reappears.
    Close and restart Firefox after each change via "Firefox > Exit" (Windows: Firefox/File > Exit; Mac: "Firefox > Quit Firefox"; Linux: "Firefox/File > Quit")
    * https://support.mozilla.org/en-US/kb/troubleshoot-firefox-issues-using-safe-mode
    *https://support.mozilla.org/kb/Safe+Mode
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes

  • Can I change the column spacing on just the title page of a 12 page excel spreadsheet?

    Greetings!  I am attempting to make a order form for work and need some help!  The order form is 12 pages long and consists of a title page with a table of contents and the other remaining 11 pages are the items one can purchase.  I am struggling with combining the title page and the other 11 pages on the same worksheet because the column spacing of the title sheet is different from the rest of the order form. Is there a way to combine the title page and the order form pages in the same worksheet but have different column spacing?  In other words, is there a way to have different column formats for the two????  I have to believe this is possible to do and I would really appreciate any advice!
    Cheers!

    What version of Excel are you using? I just looked at my old version, but couldn't find a way. It had a Page Break, but not a Section Break.
    There's one possibility.
    Let's say Page 1 has 7 columns - A thru G
    Put the remaining 11 pages in columns H thru N
    Is the final product going to remain in Excel format or another format like PDF? If PDF, you could save Page 1 in PDF format & then save the remaining pages in PDF format. Then combine the two files.
     Cheers, Tom

  • Imagee besides  title of a frame

    How do you get an image besides the title of a frame?Please help?

    How do you get an image besides the title of a frame? Please help?To get the icon {@link java.awt.Frame#getIconImage()}
    http://java.sun.com/j2se/1.5.0/docs/api/java/awt/Frame.html
    God bless ^_^

  • How can I change the title in the window at any time?

    As title

    setTitle
    public void setTitle(String title)
    Sets the title for this frame to the specified string.
    Parameters:
    title - the title to be displayed in the frame's border
    title - the title to be displayed in the frame's border. A null value is treated as an empty string, "".
    See Also:
    getTitle()
    for an example:
    // get project name and set window title accordingly
    String oldTitle = new String("");
    oldTitle = <windowname>.getTitle();
    <windowname>.setTitle(oldTitle + " - " + projectName;

  • Running LV application from remote panel which measures FP through different LAN

    My LabVIEW application is running in a PC and it takes measurements from the FieldPoint modules which are connected via the FP-1601 network module.
    I want to view and execute the application from another PC using remote panel option. The master PC has two LAN connections, one seperate connection for the FieldPoint module and the second one to connect with other PCs.
    But the application returns error while initializing the FP modules when executed from remote panel.
    Will the application be able to communicate and take measurements from the FieldPoint module in this case? Please explain.
    Thanks for the help and awaiting earlier response.
    Thank you,
    Rajeswari

    In principle this I believe this is a TCP/IP routing issue.
    If your fieldpoint unit is connected to one card lets say
    Card 01 Host 10.0.0.1 255.255.255.0 ---- Fieldpoint 10.0.0.2 255.255.255.0
    Card 02 Host 168.95.0.1 255.255.0.0 ---- Lan 168.95.x.x 255.255.0.0
    The routing in the host takes care of which card is used for which network segment.
    My guess is that you have not seperated the network segments as shown above.
    Is this correct ?

  • Moving Fields from left panel to right panel

    Hello All
    I am involved in configuring web ui screens. I want to actually move captions and fields from left panel ( Colums A-H) to Right Panel ( Colums I-P). When I go into field properties, it;s not giving me the option to enter colums from right panel.
    Or show me how to do this
    Please reply asap Gurus
    Thanks

    Hi,
    Please follow below steps:
    1. Go to config tab
    2. Choose the right config.
    3. Go to edit mode.
    4, Display available fields.
    5. you can see two blocks now. One with available fields and other with your displayed fields.
    6. In your displayed fields block you can see two buttons in top left corner (right above A column). One with plus sign and other with minus. Similarly you can see two buttons on top right corner( right above P column) of your displayed fields block.
    7. select a field you want to move from displayed columns by clicking on it. Click on minus button on top( the one above A). Now this field would be moved to available fields under its context node. Locate the field there.
    8.Select the field on Available fields block and then click on 'plus' button on right side( one above P).
    Your field would be moved to Right side.
    Also you can click on a field and click on show properties button and directly mention the column where you want this field to appear( Make sure you are edit mode so that you can change the column names). Also while doing this please make sure the columns you are entering are not occupied by other field.
    Hope that helps.
    Regards,
    BJ

Maybe you are looking for

  • DVI to component adapter and G5

    Hello, I was wondering if a DVI to component adapter will work with my 1.8mhz G5? I want to connect my computer to my HDTV, but I am not sure if these adapters will work. Thanks for any help, John

  • Reader extend pdf form in designer?

    is it possible to reader extend a pdf form in designer? i did it in adobe acrobat pro trial version, via advanced/extend features in adobe reader  but the form is not sending anything to my SOAP endpoint.. it works fine when opening the pdf in adobe

  • Can't uncheck "Show Hard Disks" option in Finder prefs.

    Hello My MacBook Pro is managed via a Jams server at work. For some reason I can't understand, the admins have decided to lock the option to "show hard disks" in Finder preferences.  I need to uncheck it, so that I can free up space on my tiny 13" de

  • Signature on Purchase order

    Hell All, Can anyone tell me whether the Digitial or scanned signature is allowed in India for the purchase order print out which has been created in SAP. If yes then could u please tell me which company is having such kind of practice. Thanks in adv

  • How do i find out what is backed up to my internal hard drive

    i backed up all my movies to an external hard drive to save space on my macbook air but when looking at the storeage space i see that there is still alot of space taken up from backups.  I have time machine set up so my macbook backups to my external