Cannot have acces to a object who extends JInternalFrame

I have a window who extends the JInternalFrame object:
public class MY_CLASS extends JInternalFrame
In a menu I try to have a pointer to this window but that doesn't work.
MY_CLASS               MyActiveFrame;
MyActiveFrame = (JInternalFrame)MyDesktop.getSelectedFrame();
And each time I have the error:
incompatible types
WHY ???????
MY_CLASS belong to the class JInternalFrame no?

You're using type casting wrong. You should be doing:
MyActiveFrame = (MY_CLASS)MyDestop.getSelectedFrame();

Similar Messages

  • I just bought a new Mac Book Pro and did a migration of the content of the old laptop (also a Mac Book Pro) to the new one. Now I cannot start Photoshop CS6. When I am starting it I have a window "Adobe photoshop CS6 extended" opening requesting a connexi

    I just bought a new Mac Book Pro and did a migration of the content of the old laptop (also a Mac Book Pro) to the new one. Now I cannot start Photoshop CS6. When I am starting it I have a window "Adobe photoshop CS6 extended" opening requesting a connexion. When I am entering my password for the connexion the software crashes. How can I fix the problem?

    Migrating, transferring or copying is DEMANDING trouble, not just asking for it.
    Always install from scratch, from the original media,

  • HT4259 I have an 802.11n base and extender and still cannot get a good signal 80-90 ft away . Why?

    I have an 802.11n base and extender and still cannot get a good signal 80-90 ft away . Why?

    Hardwire is always recommended because there is virtually no signal loss in a wire....at least up to 300 feet or so.
    Another advantage of using Ethernet cable...if you can...is that you can locate the AirPort Express where it is most needed.
    If it extends using wireless only, it pretty much needs to be located about half the distance from the main router and the general area that needs more coverage.
    I like to use WiFi Explorer since it displays SNR (Signal to Noise) readings, which are the best way to evaluate signal quality.
    Mac App Store - WiFi Explorer
    If the signal is varying constantly, something is causing it to do so....assuming that the AirPorts are functioning correctly.
    Cordless phones are a huge problem for wireless networks.  You want to try to figure out if the phones are causing a problem as a first troubleshooting step.
    That is why I suggested that you turn off the phones for an hour or two and watch the network to see how it behaves.  If the signal stops fluctuating....that is a good clue that the phones are interfering with the wireless signal.

  • HT1920 i cannot no longer play some song because the apple id that i used to  buy it is no longer available. how dont have acces to my hold email account.

    hello,
              its been a while since i change my email count. I have song the I bought with the old email. i have the files but i can no longer play them beceuse itunes is asking for the password under that old email. the files are under itunes ID***************  Idont have acces to the old email anymore. my new apple ID is*********************** how can i fix this problem since i have a couple of songs under my old apple ID that i can play?
    <Email Edited by Host>

    It's not a good idea to post your email address on public forums, I've asked the hosts to remove them.
    All content is tied to the account that downloaded them, and you can't currently transfer them to a different account. If you don't know the password to that account then you can try getting it reset via this page http://iforgot.apple.com . If you can't get it done that way then you can try getting access to the account by contacting iTunes Support : http://www.apple.com/support/itunes/contact/ - click on Contact iTunes Store Support on the right-hand side of the page. If you get access to it you can then change the primary email account on it to one that you have access to : http://appleid.apple.com

  • How can you get  the public variables from object that extends JLabel?

    I'm using the mouseClickedListener method e.getComponent(); to get the component that is clicked on the sceen. The component i clicked is type "object" and extends a jlabel, and i really need to acces a variable from it. Heres the code i'm using-
    MouseListener listenerDown=new java.awt.event.MouseListener() {
            public void mousePressed(MouseEvent e){
                paintAll();
                mX=e.getX();
                mY=e.getY();
            public void mouseClicked(MouseEvent e) {
                Component c = e.getComponent();
                drawResizeBox(c);
                selected=c;
            public void mouseReleased(MouseEvent e) {
            public void mouseEntered(MouseEvent e) {
            public void mouseExited(MouseEvent e) {
    package javapoint;
    import java.awt.Color;
    import java.awt.Graphics2D;
    import java.awt.Image;
    import java.awt.Rectangle;
    import java.awt.RenderingHints;
    import java.awt.geom.Line2D;
    import java.awt.image.BufferedImage;
    import javax.swing.Icon;
    import javax.swing.ImageIcon;
    import javax.swing.JLabel;
    public class object extends JLabel{
        public object(Rectangle rect,int id){
            idNum=id;
            Rect=rect;
            BufferedImage image = new BufferedImage((int)rect.getWidth()+1, (int)rect.getHeight()+1, BufferedImage.TYPE_INT_ARGB);
            Graphics2D g = (Graphics2D) image.getGraphics();       
            g.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
            g.drawRect((int)rect.getX(), (int)rect.getY(), (int)rect.getWidth(), (int)rect.getHeight());
            Icon icon = new ImageIcon((Image)image);
            setIcon(icon);
            setBounds((int)rect.getX()-1, (int)rect.getY()-1, (int)rect.getWidth()+1, (int)rect.getHeight()+1);
            mainFrame.slideArr[mainFrame.sIndx].add(this);
            setVisible(true);
            r=true;       
        object(Oval oval,int id){
            idNum=id;       
            setBounds(oval.getX(), oval.getY(), oval.getWidth(), oval.getHeight());
            getGraphics().drawOval(oval.getX(), oval.getY(), oval.getWidth(), oval.getHeight());
            o=true;
            setVisible(true);
        object(Line2D line,int id){
            idNum=id;       
            setBounds((int)line.getX1(), (int)line.getY1(), (int)line.getX2(), (int)line.getY2()); //Not gunna work
            getGraphics().drawLine((int)line.getX1(), (int)line.getY1(), (int)line.getX2(), (int)line.getY2());
            l=true;
            setVisible(true);
        object(Icon icon,int id){
            idNum=id;
            setIcon(icon);
            setBounds(50,50,icon.getIconWidth(),icon.getIconHeight());
            i=true;
            setVisible(true);
        void drawObject(object obj){
            if(r){
                Rectangle rect=obj.Rect;
                setBounds((int)rect.getX()-1, (int)rect.getY()-1, (int)rect.getWidth()+1, (int)rect.getHeight()+1);          
                Rect=rect;
                BufferedImage image = new BufferedImage((int)rect.getWidth()+1, (int)rect.getHeight()+1, BufferedImage.TYPE_INT_ARGB);
                Graphics2D g = (Graphics2D) image.getGraphics();           
                g.setColor(Color.red);
                g.drawRect(0, 0, (int)rect.getWidth(), (int)rect.getHeight());           
                Icon icon = new ImageIcon((Image)image);
                setIcon(icon);
            }else if(l){
            }else if(o){
            }else if(i){
        public boolean r=false;
        public Rectangle Rect;
        public boolean o=false;
        public Oval Oval;
        public boolean l=false;
        public Line2D Line;
        public boolean i=false;
        public Icon Icon;
        public JLabel label;
        public int idNum;
    }Edited by: ghostbust555 on Feb 12, 2010 2:14 PM

    ghostbust555 wrote:
    Well see the problem is i have an array of 200 objects.What does that have to do with anything? And if it does, why isn't it in the code you posted?
    I dont understand what you mean in your "Edit..." part. could you show some code/ explain farther? sorry if its a dumb question I'm still a bit of a novice at java.Yeah.
    object yuck = (object) e.getComponent(); // That's a cast.
    boolean yucksR = yuck.r; // Get the "r" variable from the object.

  • How can I have acces to a component of a window from a menu

    In a JInternalFrame, I have one Button.
    I try to access to this Button from a ActionListener of a JMenuBar.
    In the ActionListener of the JMenuBar, I have use the function "MyActiveFrame = MyDesktop.getSelectedFrame();" for having a pointer to my JInternalFrame.
    But I don't arrive to access to a component of my JInternalFrame.
    I have try "Button Boutton1 = MyDesktop.Boutton1;" but that don't work. It always say :
         java:56: cannot resolve symbol
         symbol : variable Boutton1
         location: class javax.swing.JDesktopPane
                        Button Boutton1 = MyDesktop.Boutton1;
    ^
    Is someone can tell my how I can have acces of this Button (and to the others component of my JInternalFrame from my JMenuBar).
    dank you in advance.

    No, that's not the problem. The problem is:
        JInternalFrame MyActiveFrame;
        MyActiveFrame = MyDesktop.getSelectedFrame();
        Button Boutton1 = MyActiveFrame.Boutton1;You are declaring MyActiveFrame as a JInternalFrame, not as the class you defined that extends JInternalFrame. Since JInternalFrame has no member named Boutton1, then MyActiveFrame.Boutton1 will cause the error.
    For example:
        public class MyFrame extends JInternalFrame {
            public Button Boutton1 = ...;
        };If you did something like:
        JInternalFrame frame = getOneOfMyFrames();
        Button b = frame.Boutton1;You would get an error. You need to do:
        MyFrame frame = getOneOfMyFrames();
        Button b = frame.Boutton1;Know what I mean?
    Jason

  • I bought a used iPhone on ebay.  when I try to activate it, I get a message that the owner needs to sign in to the device with their appleID and password.  I have no way of knowing who the owner is.  How can I get around this?

    I bought a used iPhone on ebay.  when I try to activate it, I get a message that the owner needs to sign in to the device with their appleID and password.  I have no way of knowing who the owner is.  How can I get around this?

    Check the eBay listing. Did it state the device was Activation Locked? If not, then make a claim as Meg stated and get a refund. You will not be able to activate the phone and no one can help you contact the owner, unless that is the person that sold the device. If they cannot remove the phone from their account because it is not theirs, then refund is your route. Even Apple cannot assist with locating the previous owner.

  • HT5019 I connect my macbook pro to an Epson wireless projector. The macbook can see the projector wirelessly and the image on the macbook is displayed on the projector. However on system ref., the arrangement tab does not show and thus cannot have multipl

    I connect my macbook pro to an Epson wireless projector. The macbook can see the projector wirelessly and the image on the macbook is displayed on the projector. However on system ref., the arrangement tab does not show and thus cannot have multiple view.
    I am trying to project Pro Presenter on the Epson projector such that I have the detail screen on the macbook and only the screen I want people to see on the projector display. This has not been possible because the arrangement tab on the Display section of the System Preference is not showing. If i tried to search for the arangement, it comes back with the message that there is not other source detected, hence the arrangement tab is not showing.
    I have also tried to connect the Epson directly to the Macbook but it still the same result, so its not because it is a wireless connection. Can someone advise me jhow to go around this problem. I have used windows before and it is very easy to extend ptojection on windows, but this system seems to be frustrating to me.
    Thanks,
    Toks

    Hi Toksyb!
    You may want to try clearing out the PRAM on your computer. This process is explained through this article:
    About NVRAM and PRAM
    http://support.apple.com/kb/ht1379
    Thanks for using the Apple Support Communities!
    Cheers,
    Braden

  • [SQL Server]Violation of PRIMARY KEY constraint 'DeploymentSummary_PK'. Cannot insert duplicate key in object 'dbo.DeploymentSummary'. The duplicate key value is

    I have migrated my SCCm 2007 environment to SCCM 2012 SP1 CU4.
    I noticed in the System Status\Component Status\SMS_STATE_SYSTEM a lot of errors like the one below:
    Microsoft SQL Server reported SQL message 2627, severity 14: [23000][2627][Microsoft][SQL Server Native Client 11.0][SQL Server]Violation of PRIMARY KEY constraint 'DeploymentSummary_PK'. Cannot insert duplicate key in object 'dbo.DeploymentSummary'. The duplicate key value is (1, 0, S0220438, 0). : spUpdateClassi
    Please refer to your Configuration Manager documentation, SQL Server documentation, or the Microsoft Knowledge Base for further troubleshooting information.
    When looking up the deployment ID and recreate the Deployment the problem is solved. But I have 700 packages and don't want to manually do this action on all packages. I think it is related to the migration i did and something went wrong there :-(
    Besides it will retriggers the deployment to the clients which is also not preferred.
    Is there another way to solve this by e.e.g do something directly in the SQL database tables ?

    Hi,
    It is not supported by Microsoft that do something directly in SQL database.
    If you want to do that, you could make a call to CSS.
    Best Regards,
    Joyce
    We
    are trying to better understand customer views on social support experience, so your participation in this
    interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.

  • SSIS - "Violation of PRIMARY KEY constraint. Cannot insert duplicate key in object ' tablename '. The duplicate key value is 1234 . Though there are no duplicate records.

    Hi,
    I am providing support to one of our clients, where we have jobs scheduled to load the data from the tables in the source database to the destination database via SSIS packages. The first time load is a full load where we truncate all the tables in the destination
    and load them from the source tables. But from the next day, we perform the incremental load from source to destination, i.e., only modified records fetched using changed tracking concept will be loaded to the destination. After full load, if we run the incremental
    load, the job is failing with the error on one of the packages "Violation of PRIMARY KEY constraint. Cannot insert duplicate key in object '<tablename>'. The duplicate key value is <1234>, even though there are no duplicate records. When we
    try debugging and running the failing package, it runs successfully. We are not able to figure out why the package fails and when we run the next day it runs successfully. Request you to help me in this regard.
    Thank you,
    Bala Murali Krishna Medipally.

    Hi,
    I am providing support to one of our clients, where we have jobs scheduled to load the data from the tables in the source database to the destination database via SSIS packages. The first time load is a full load where we truncate all the tables in the destination
    and load them from the source tables. But from the next day, we perform the incremental load from source to destination, i.e., only modified records fetched using changed tracking concept will be loaded to the destination. After full load, if we run the incremental
    load, the job is failing with the error on one of the packages "Violation of PRIMARY KEY constraint. Cannot insert duplicate key in object '<tablename>'. The duplicate key value is <1234>, even though there are no duplicate records. When we
    try debugging and running the failing package, it runs successfully. We are not able to figure out why the package fails and when we run the next day it runs successfully. Request you to help me in this regard.
    Thank you,
    Bala Murali Krishna Medipally.
    I suspect you are trying to insert modified records instead of updating.

  • We have a wireless internet conundrum (who doesn't).

    We have a wireless internet conundrum (who doesn't).
    I have a new Airport Extreme Base-station (n-standard) in our basement. I bought this after frustrations with linksys and belkin routers as far as distance from router connection is concerned. My issue is not speed. Specifically, I have the router in the finished basement with my "precious" iMac Intel which is ethernet hardwired to the base-station. The PROBLEM is getting a wireless connection with my daughter's iMac G4 on the 2nd floor.
    This makes the problem interesting (from system profiler):
    iMac Power PC G4 (3.3)
    CPU 1 GHz\Mem 768 MB
    iBook G4 Power PC (1.5)
    CPU 1.42 GHz\Mem 1.5 GB
    Both of the above computers have the following wireless specs:
    Airport Extreme Card
    Firmware 405.1(3.90.34.0.p18)
    Channel 1
    The iBook shown above picks up the connection perfectly well in my daughter's room with a full signal level indicator but the iMac does not connect- the signal indicator is almost zero. The iMac when moved to the first floor is fine.
    The way I see it one solution might be to move the router to the first floor and take my "precious" off of hardwire connection and go wireless and experience a speed drop.
    If I have no other choice, I would prefer to throw a "few bucks" at the problem and keep my "precious" blazing. Does anyone have any other ideas? Can I buy something to extend the Airport signal further? An antenna for the Power PC iMac? Could the iMac's Airport Extreme Card be bad? Is there such a thing as an wireless n-card that plugs into a UBS port?
    Thanks for any suggestions.
    iMac Intel 2MB Ram   Mac OS X (10.4.10)  

    The iBook shown above picks up the connection perfectly well in my daughter's room with a full signal level indicator but the iMac does not connect- the signal indicator is almost zero. The iMac when moved to the first floor is fine.
    It is very possible that you may have some form of Wi-Fi interference in the basement area that is preventing you from getting a good clean signal when the iMac is located there.
    I suggest you perform a simple site survey, using utilities like KisMAC, MacStumbler, iStumbler, or IPNetMonitorX to determine potential areas of interference...and then, try to either eliminate or significantly reduce them.
    Can I buy something to extend the Airport signal further? An antenna for the Power PC iMac?
    Check out QuickerTek transceivers.
    Could the iMac's Airport Extreme Card be bad?
    Since you mentioned that you got good performance on the 1st floor with the iMac, I would doubt there is something wrong with the AirPort Extreme Card in your iMac.
    Is there such a thing as an wireless n-card that plugs into a UBS port?
    Same outfit, QuickerTek now offers 802.11n upgrades for Macs. However, the model for the iMac is internal and does not plug into a USB port.

  • Events cannot have multiple exceptions for the same date

    I just starting getting this message and could not sync to one of my Google calendars. I'm posting this for others who might get the same problem.
    I didn't find the answer on these forums but did find it on this thread on Google:
    http://www.google.com/support/forum/p/Calendar/thread?tid=241155f758d9e2a4&hl=en
    Here's the important excerpt:
    "I had a client, who just had this same issue, nothing to do with Google cals.
    It was apparently, in my best guess, a corruption of the subscribed cal.
    *I did a get info on the cal, copied the URL, deleted the cal, then re-subscribed to it by pasting in the URL, and now it's working fine*."

    I've been having the same problem with my iCal calendars and the "Events cannot have multiple exceptions for the same date" error. Once it gets going, it uses up a lot of the CPU and resources. After reinstalling iCal, all my calendars were missing and I could not even resubscribe to them.
    I took my MacBook Pro to the Apple Store, and they were able to solve the problem by moving some of the iCal files from their existing folders out to the desktop, and reopening the program. That got it working, however, now I'm having the same problem again. So back to square one. Anyone else having this issue and know the cause?
    My setup is my MacBook Pro uses Entourage, use that calendar in my iCal. And I subscribe to two calendars my wife publishes on her Macbook. We're both using Snow Leopard.

  • Cannot insert duplicate key in object 'dbo.CultureObjectStrings'

    Hi Everyone,
    No matter what instance I chose to run the Tasks function on the Installer I get this error:
    Violation of UNIQUE KEY constraint 'IX_CultureObjectStrings'. 
    Cannot insert duplicate key in object 'dbo.CultureObjectStrings'
    The statement has been terminated.
    The Tasks Utility stops at 'Initialize Languages'. When I look at the CRM online I checked the Config Settings, Netpoint, Culture and it is set to English(United States).
    I am running Business One SP01 Pl 06 and WebTools 6 PL04.  I have created new instances and database and still get the same error when running Tasks after they have been built and synched.
    What else can I do?
    Thanks, Chester

    Hi Stephen,
    Sorry, I am running SP01 PL 4 on WebTools.  I am not running 'instance mode' I am running 'Tasks' mode.  The reason this all started was when I got all of  my customers data(databases,instance.xml,synch.xml, etc.)  to run on my PC.  Once everything is transfered to my PC, I run 'task' mode to insure I have the right hash and private keys assoicated with the data.  When I frist started doing this procedure it worked, and I don't which levels back that was, but now it is a problem.  So, when I saw this happening with the transfer of the data to my PC, I thought I'd try  running 'tasks' mode on the orginal data just make sure I had everything.  When I said I built new companies I used the OEC data that come with WebTools because I thought maybe it the customers data, but it didn't matter, still got the same error.
    Thanks, Chester

  • Cannot have multiple DOCTYPE declarations

    I discoverd that my application gives an error when i'm using Internet Explorer 6.
    It says: Cannot have multiple DOCTYPE declarations.
    With the view source option I see twice a doctype declaration. Although in my JDeveloper project there is only one jsp:output tag with the doctype declaration.
    When i'm using IE7 or Firefox i don't get the error. Can anyone tell me why JDeveloper generate the DOCTYPE declaration twice and how i can fix this?!

    I found out a solution...
    There is a jsp:output tag in the source who prints the Doctype ones and the other is being generated by the <afh:html> tag.
    If you delete the jsp:output tag the problem is solved...

  • *** [23000][2627][Microsoft][SQL Server Native Client 11.0][SQL Server]Violation of UNIQUE KEY constraint 'ClientPushMachine_G_AK'. Cannot insert duplicate key in object 'dbo.ClientPushMachine_G'. The duplicate key value is (16777412). : sp_CP_CheckNewAss

    *** [23000][2627][Microsoft][SQL Server Native Client 11.0][SQL Server]Violation of UNIQUE KEY constraint 'ClientPushMachine_G_AK'. Cannot insert duplicate key in object 'dbo.ClientPushMachine_G'. The duplicate key value is (16777412). : sp_CP_CheckNewAssignedMachine
    CCCRT::RunSQLStoredProc - Failed to execute SQL cmd exec [sp_CP_CheckNewAssignedMachine] N'xxx', 1
    CCRQueueRequest::GetRequestFromQueue - Failed to execute SQL cmd sp_CP_CheckNewAssignedMachine
    I get the above issue and the one below at a client site; the error started with the error below then changed to the one reported above and back to the one below. Everything is working as it should but the issues
    started when one of the admins at the data-centre incorrectly applied a gpo which affected a number of service accounts (sccm inclusive) and they expired....hence reporting in sccm got broke as well as this error in the ccm.log file appeared.
    Remote client install still works but I believe this error affects new client discovered by sccm, so in other words devices discovered by sccm do not get the client installed automatically....but if all access and permissions are in place...pushing out the
    client to the new discovered system works, it just not done automatically, which kinda defeats one the reasons for using sccm.
    I have searched the breadth of the tinternet and I can only find two technet reference to the same error  - one says to edit the stored procedure on the sql server which I don't think should be done... Like Jason said and I concur....its bad joo joos.
    The second suggestion, said you should select all the options in the Client Push Installation properties, I have tried this but hasn't solved the problem.
    I am planning to upgrade the site to the R2 CU3 before the end of the year but I would like to resolve this error before the upgrade.
    The site is currently sccm 2012 sp1 
    Any idea?> Resolution? sil vous plait!
    Merci

    Hi ,
    Please back up the database of the SCCM site. Then run the following query against the Site DB and see how it goes.
    DELETE FROM System_SMS_Resident_ARR
    WHERE ItemKey IN (
    SELECT ItemKey FROM vSystem_SMS_Resident_ARR
    GROUP BY ItemKey
    HAVING COUNT(ItemKey) > 1
    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.

Maybe you are looking for