Without casting, is there anyother way?

Without inserting the casting at each aPanel,
is there any other way to do this?
package hiding.test;
public class ParentPanel {
     public String aButton;
     public ParentPanel() {
          System.out.println("Hi, parent!");
     public void init() {          
          aButton = new String("aButtonAtParent");
          System.out.println(aButton + "init() Parent");
     public String getAButton() {
          // TODO Auto-generated method stub
          return aButton;
package hiding.test;
public class ChildPanel extends ParentPanel {
     public String aButton;
     public ChildPanel() {
          System.out.println("Hi, Child!");
     public void init() {     
          aButton = new String("aButtonAtChild");
          System.out.println(aButton  + "---init() Child");
     public String getAButton() {
          return aButton + "- child";
package hiding.test;
public class MainTest {
     public static void main(String[] args) {
          ParentPanel aPanel = new ChildPanel();
          aPanel.init();
          //----- Question ???? : -------------------------------------------------
          // without casting like this  ( (ChildPanel) aPanel).aButton)
          // is there any other way to do it???
          System.out.println("===aPanel.aButton =" + ( (ChildPanel) aPanel).aButton);
          System.out.println("===aPanel.getAButton()=" + aPanel.getAButton());     
}null

The reason why is the following, there is one big panel.
I have to change only the one of big panel.
And big panel is shared by each version.
A version -- requires no change.
B version-- requires only the one panel of Big panel needs to be changed.
So, I created createTheOnePanel() method return Parent Panel in BigPanel and when BigPanel is called the first time, I redefine this method so that it returns ChildPanel.
Now, it works aPanel = createTheOnePanel() // returns ChildPanel in BigPanel.java But, aPanel.aButton and all others are null, unless
I put the cast in front of them.
However, I cannot put cast in front of them because the case when
aPanel = createTheOnePanel() ; /// returns ParentPanel.
So, without putting the cast, what do I need to do, I remember I did
create GetXXX() very slightly---

Similar Messages

  • Scheduling Discoverer Reports in Bulk (without GUI) - is there a way?

    Hi all,
    I'm looking for a way to schedule a bunch of reports without using the GUI (there's zillions of reports that run well most of the time but sometimes some of them don't work, so instead of having people going mad clicking through all of them in search of one that doesn't work we'd like to schedule them all and check which one didn't run).
    I know we can schedule reports using GUI (tested) but GUI means I'll have to open and schedule each report by hand.
    While doing it manually would probably keep me busy until retirement age I fear for my sanity if I start doing it that way.
    Does anyone have a pointer on how to handle it? I'd love to do it through direct access to the meta tables, command line is good (although I see no documentation on scheduling via command line, only on scheduling a command to run report and running it via an external scheduler).
    Thank you all in advance,
    C

    Hi,
    is there a way? Not really. When Discoverer schedules a workbook it updates the EUL with details of the batched workbook, creates a package and view to run the workbook and schedules a job on DBMS_JOBs queue. There is no API to do this from outside Discoverer so you would have to write your own API.
    Another good reason for using a 3rd party scheduler.
    Rod West

  • My verifacation for itunes girt card its all scratched up is there anyother way to put thi gift card on my account

    Hello
    i have a gift and on the back of it is where the code is but while i was scratching it off the numbers got all weird to where i cant ready them is there any other way to put this card on my account or any way to find out what my number was

    Seen this?
    http://www.apple.com/hk/en/support/itunes/store/giftcard/

  • Actually my stupid previous owner also forgot isnt there anyother way i could restart my ipad, actually my stupid previous owner also forgot isnt there anyother way i could restart my ipad

    plzz help me plz i need to repen my ipad its urgent

    ....pardon,
    but the smarter new owner didn't check to make sure the device was properly functional and then erased before he bought it?
    http://support.apple.com/kb/HT5661
    You must contact the previous owner to unlock the iPad.
    I hope you purchased with a credit card......

  • Is there a way to remove lens color cast?

    Hi
    i took some photos with a Sigma 12-24mm f/4.5-5.6 EX DG with a canon 5d mark 3 and mark 2
    and i noticed some magenta color cast
    i tried the color passport check but and create a dng profile , but it doesn't eliminate the color cast
    is there a way to remove this magenta color cast?
    a tutorial , some advises
    photoshop cs6 64bit windows 7
    thanks

    Color Balance is a simple way, not automatic though.

  • Is there a way to get the ImageReady Actions into PS CS4?

    Recently I made the jump from cs2 to cs4 and I miss ImageReady.  I know the animation in built into CS4 but what about the cool actions that i liked so much... zoom in, zoom out and the spinning and such.  Where can I find actions like to use in CS4 animations?....is there a way to get them from ImageReady and install them into CS4?
    Thanks,
    Rick.
    I am sure I will have more questions in the near future

    Adobe wants you to buy another of their applications to do animations, so ImageReady disppeared without trace .
    There are ways of doing animations in CS4 but I doubt that your actions will work any more.

  • Is there any way to call OCX components from forms 10g..?

    Dear All,
    I heard that OCX are deprecated features for Forms 9i (9.0.2) and higher. Is there anyother way to invoke the same from forms9i and higher versions.
    We need to do this one of our customer. In forms10g oracle completely removed that option from the tool bar.
    Any help would be greatly appreciated.
    Thanks in advance
    Thangaraj.S

    then it was a "bug" in 9i and they removed it a little bit to late from the toolbar.
    Because Active X can't run in a standard-java-environment like the Forms-Service in your client-browsers generic applet, you have to search for new widgets that do the same in Java and not in OCX.
    use google to search for such components

  • Is there a way to get iCal to put the time of each event on Monthly view without going in and editing each event?

    When I enter a new event on iCal with the time, it leaves the time off of the Monthly view and in order for me to glance at the times of the day's events I have to click on each event or go into the event and edit it again putting the time on, for it to show.  Is there a way to get it to show without doing this?

    Sorry.  Only after posting did I see that this question has been asked already and the answer given.  Please ignore this post.

  • Is there another way of getting apps from the appstore without putting your credit card number in, ive heard about the itunes gift card thing can anybody just give me more info about that and how i can buy free things free things from the appstorepls help

    Is there another way of getting apps from the appstore without putting your credit card number in, ive heard about the itunes gift card thing can anybody just give me more info about that and how i can buy free things free things from the appstore...pls help as im only a teenager and have no credit credit and my parents dont trust me with theres and they dont care about the fact that you can set up a password/.... PLEASE SOMEONE HELP I WILL BE SO GRATEFUL... And i would really like to get the iphone 4 but if there is no way of etting apps without your credit number then i would have to get a samsung galaxy s3 maybe ...

    You can set up an Apple ID without a credit card.
    Create iTunes Store account without credit card - Support - Apple - http://support.apple.com/kb/ht2534

  • I got a new computer recently and don't have my old laptop, which has all of the songs in my Itunes on it. I have all of the songs on my iPod touch, is there a way to transfer them to my new computer without having the old one?

    I would like to get the music from my iPod touch onto my new laptop (which a PC), but I am affraid that if I plug in my iPod then I will lose all of my music. Is there a way to transfer the music from my iPod to my new laptop without losing songs?

    If you do not have access to the iTunes Library on your Old computer... or its Backup...
    See these 2 Links...
    Syncing to a New Computer...
    https://discussions.apple.com/docs/DOC-3141
    Recovering your iTunes library from your iPod or iOS device
    https://discussions.apple.com/docs/DOC-3991
    If you do have access... See Here...
    iTunes: How to move your music to a new computer
    Or...
    From your OLD computer...
    Copy your ENTIRE iTunes FOLDER to an External Drive... and then from the External Drive to your New Computer..
    Full Details Here  >  http://support.apple.com/kb/HT1751
    An Added Bonus is that you will have a Backup of iTunes.

  • Is there a way to play music on my iphone (4) without it being interrupted by phone calls?

    Is there a way to play music on my iphone 4s without it being interrupted by phone calls?

    Settings > Airplane Mode > ON

  • After having yet another problem with my MacBook Pro and having to wipe the drive, I am now unable to sync my iPhones etc without erasing all the music on them. Is there a way around this? I have no other library!

    After having yet another problem with my MacBook Pro and having to wipe the drive, I am now unable to sync my iPhones etc without erasing all the music on them. Is there a way around this? I have no other library!
    iTunes is a mess! It couldn't find it's own libraries and I was forced to create a new one. Now I don't know where my music is or if any's missing.

    columbus new boy wrote:
    How crap is that?
    It's not crap at all.
    It's not that simple. For example, I've 3500 songs on my MacBook but don't want them all on my phone, so I have to manually select each song again???
    There has to be a solution.
    Why not simply make a playlist with the songs you want on the iPhone?
    and maintain a current backup of your computer.

  • I have hidden unwanted books from the purchased area of the iBooks store, but they're are still appearing on the front page of iOS as cloud downloads, is there a way to remove these from iBooks without using the hide iCloud books button?

    I have hidden unwanted books from the purchased area of the iBooks store, but they're are still appearing on the front page of iOS as cloud downloads, is there a way to remove these from iBooks without using the hide iCloud books button?
    Let me explain a little more. I had downloaded a lot of free books in the past as a trial when iBooks was first released and since then I have decided I no longer want them, because of this I hid them from the purchased section of the iBooks store. The 5 books left are ones I decided to keep as seen in the following picture.
    This is how it appears in iBooks on my mac. There are 4 books downloaded and 1 book that I have decided not to download at this time. I would still like to keep this book available in the cloud incase I want to download it again in the future. You’ll notice that hide iCloud books is not selected, if I wanted to hide the book that I have chosen to keep in the cloud, but have not downloaded yet I could.
    This is exactly how I think this feature should work. If you have hidden a book from your purchases it should not show up in the mac Ibooks app. (I am aware you can never actually delete a purchase, just hide them and that hidden purchases can be restored to your account from within the account management section of the iBooks store).
    The iOS app is working differently for me. Here is a picture of the purchased tab on the iBooks store in iOS Ibooks. Again notice that pictures of Lilly is still yet to be downloaded. This is how I expected it to look.
    If we visit the front page of iOS iBooks the view is very different from what I expected. Here we can see the 4 books I wanted to keep on my device and have downloaded. We can also see the 1 book I wanted to keep, but did not want to store locally on the device and left in iCloud (Pictures of Lilly). However we can also see all the books I had hidden from the purchased section of my iTunes account and which I believe should no-longer be visible, Dracula, frankenstein etc…
    I am aware of the hide iCloud books button within the iOS app, but I did not need to use this to hide the books I had removed from the my purchased section of the iBooks store on the mac, why are they still appearing in iOS?
    I’m still not sure if this is a software glitch or not. This article suggests to me that books can be hidden, but I had already completed these steps.
    https://support.apple.com/en-us/HT201322
    A browse of google also suggests people may have been able to hide past purchases from the front page of iBooks on iOS in the past.
    In case there was an issue with syncing I tried logging in and out of my iTunes account via settings in iOS. Force closing the app, disabling automatic downloads and removing my device from iTunes in the cloud. Syncing with iTunes on the mac did not correct the issue either.
    Interestingly I have the same issue on my iPhone 6 running iOS 8.3 as I do on my iPad mini suggesting that this might be an issue either with my account or with iOS iBooks software in general.
    If there is a way to remove the already hidden iBooks in your account from the front page of iBooks on iOS without using the hide iCloud downloads button? Please help community!

    My apologies for the lack of photos, here is my post again with photos.
    I have hidden unwanted books from the purchased area of the iBooks store, but they're are still appearing on the front page of iOS as cloud downloads, is there a way to remove these from iBooks without using the hide iCloud books button?
    Let me explain a little more. I had downloaded a lot of free books in the past as a trial when iBooks was first released and since then I have decided I no longer want them, because of this I hid them from the purchased section of the iBooks store. The 5 books left are ones I decided to keep as seen in the following picture.
    This is how it appears in iBooks on my mac. There are 4 books downloaded and 1 book that I have decided not to download at this time. I would still like to keep this book available in the cloud incase I want to download it again in the future. You’ll notice that hide iCloud books is not selected, if I wanted to hide the book that I have chosen to keep in the cloud, but have not downloaded yet I could.
    This is exactly how I think this feature should work. If you have hidden a book from your purchases it should not show up in the mac Ibooks app. (I am aware you can never actually delete a purchase, just hide them and that hidden purchases can be restored to your account from within the account management section of the iBooks store).
    The iOS app is working differently for me. Here is a picture of the purchased tab on the iBooks store in iOS Ibooks. Again notice that pictures of Lilly is still yet to be downloaded. This is how I expected it to look.
    If we visit the front page of iOS iBooks the view is very different from what I expected. Here we can see the 4 books I wanted to keep on my device and have downloaded. We can also see the 1 book I wanted to keep, but did not want to store locally on the device and left in iCloud (Pictures of Lilly). However we can also see all the books I had hidden from the purchased section of my iTunes account and which I believe should no-longer be visible, Dracula, frankenstein etc…
    I am aware of the hide iCloud books button within the iOS app, but I did not need to use this to hide the books I had removed from the my purchased section of the iBooks store on the mac, why are they still appearing in iOS?
    I’m still not sure if this is a software glitch or not. This article suggests to me that books can be hidden, but I had already completed these steps.
    https://support.apple.com/en-us/HT201322
    A browse of google also suggests people may have been able to hide past purchases from the front page of iBooks on iOS in the past.
    In case there was an issue with syncing I tried logging in and out of my iTunes account via settings in iOS. Force closing the app, disabling automatic downloads and removing my device from iTunes in the cloud. Syncing with iTunes on the mac did not correct the issue either.
    Interestingly I have the same issue on my iPhone 6 running iOS 8.3 as I do on my iPad mini suggesting that this might be an issue either with my account or with iOS iBooks software in general.
    If there is a way to remove the already hidden iBooks in your account from the front page of iBooks on iOS without using the hide iCloud downloads button? Please help community!
    iPhone 6, iOS 8.3, Also an issue on my iPad mini iOS 8

  • I purchased a Holux M-1200E Bluetooth GPS Data Logger.  The device paired with my laptop just fine so I know it is working right.  The device will not even show up on my iphone or ipad to pair via bluetooth.  Is there a way to pair without jailbreaking???

    I purchased a Holux M-1200E Bluetooth GPS Data Logger.  The device paired with my laptop just fine so I know it is working right.  The device will not even show up on my iphone or ipad to pair via bluetooth.  Is there a way to pair without jailbreaking???  I haven't had any trouble to date pairing any devic with my iphone or ipad, this is ridiculous!!!!  Is there a way to update my bluetooth settings on my iphone 4s to be able to have this device be recognized???  I love my apple devices, but this is very frustrating.  I bought this Data Logger for a specific purpuse to help out with my Search and Rescue volunteer activities, and I really need help with this!!!  I am hoping apple will help me!!!
    Thanks,
    Melissa

    melissafromlenexa wrote:
    That is not the right device, it is the
    Holux
    M-1200E Bluetooth GPS Logger
    I looked at the same sight for that and it does not say that.  This is the first time I have posted a question, you don't have to be mean about it.  I am trying to get this to work for a good cause. 
    It may be the best source of assistance is the manufacturer of the device. I suspect you will need a specific app for the iPhone to get it to work, but the site is rather ambiguous about that.

  • Please Help! Somehow I have messed up my password and now I am locked out of my iPod. Is there a way to get back in without losing all my photos?

    Please Help! Somehow I have managed to mess up my password and now I am locked out of my Ipod.  Is there a way back in without losing all my photos?

    Place the iOS device in Recovery Mode and then connect to your computer and restore via iTunes. The iPod will be erased.
    iOS: Wrong passcode results in red disabled screen
    If recovery mode does not work try DFU mode.
    How to put iPod touch / iPhone into DFU mode « Karthik's scribblings

Maybe you are looking for

  • IPod touch 2G not detected in iTunes 10.1.2.

    Hello, I have a Apple iPod touch 2nd Generation bought in 2009 running iOS 4.1. I'm currently running iTunes 10.1.2(x64) on Microsoft Windows 7 Ultimate(x64). Recently when I connected my iPod touch to my PC, it didn't got detected in iTunes but was

  • Using Document Filters with the Japanese character sets

    Not sure if this belongs here or on the Swing Topic but here goes: I have been requested to restrict entry in a JTextField to English alphaNumeric and Full-width Katakana. The East Asian language support also allows Hiragana and Half-width Katakana.

  • Calling Bapi from Dot Net

    Hi All, We are Trying to upload Bapi's From Dot Net. When we are uploading Sales Order upload i will get this error ""ERROR: Sales document type DG-1 is not defined"" ,But If i Call Again It is not giving the any error and simply its updating the SAP

  • Setting the scaleMode in Xcelsius

    One of the things that has caused me no end of grief with clients is the fact that the scaleMode on Xcelsius doesn't seem to be immediately apparent. What ends up happening is that text is skewed and scaled from design, and tends to look different on

  • Is it possible to save a text document from your computer to the Ipod Touch

    Is it? I was hoping to get some lyrics onto my Ipod. Normally I would use the internet but I'm having issues with the internet. (That's another story for another day).