Drawing into TabbedPane doesn't work

Hi,
I want some stuff to draw distribute among several tabs which was originaly all in one panel.
This is basically what I did:
public Gui() {
        initComponents();
        this.setLocation(10, 10);
        this.setSize(800, 600);
        tabbedPane = new JTabbedPane();
        drawingPane = new DrawingPane();
        scroller = new JScrollPane();
        scroller.add(drawingPane);
        doSomeDrawing();
        this.add(tabbedPane, BorderLayout.CENTER);
    }But when I start the program the TabbedPane shows nothing which I can't quite understand. All I did was adding a tabbedPane to the hierarchy of components and putting into it what worked before flawlessly.
This is what the code looked like before I added the tabbedPane:
public Gui() {
        initComponents();
        this.setLocation(10, 10);
        this.setSize(800, 600);
        drawingPane = new DrawingPane();
        scroller = new JScrollPane();
        scroller.add(drawingPane);
        doSomeDrawing();
        this.add(scroller, BorderLayout.CENTER);
    }Any ideas why there is nothing to see?

Shit, I just shortened the example too much. I'm afraid some more code is necessary:
So this is the initiating method:
public Gui() {
        initComponents();
        dbCon = new DBConnector();
        objects = new LinkedList<Objects>();
        objects = dbCon.getAllObjects();
        this.setLocation(10, 10);
        this.setSize(800, 600);
        floors = dbCon.getFloorsName();
        drawingPane = new DrawingPane[floors.size()];
        scroller = new JScrollPane[floors.size()];
        windows = new JTabbedPane(JTabbedPane.TOP);
        for(int i = 0; i < floors.size(); i++) {
            drawingPane[i] = new DrawingPane();
            scroller[i] = new JScrollPane();
            scroller.add(drawingPane[i]);
windows.addTab(floors.get(i).toString(), scroller[i]);
for(int k = 0; k < scroller.length; k++) {
final int index = k;
scroller[k].getVerticalScrollBar().addAdjustmentListener(new AdjustmentListener() {
public void adjustmentValueChanged(AdjustmentEvent e) {
scroller[index].repaint();
scroller[index].getHorizontalScrollBar().addAdjustmentListener(new AdjustmentListener() {
public void adjustmentValueChanged(AdjustmentEvent e) {
scroller[index].repaint();
this.add(windows, BorderLayout.CENTER);
When the containing frame is visible I call a method like
   public void drawComponents(java.util.List<Objects> objectsToDraw) {
     java.util.List<Polygon> polygons = new LinkedList<Polygon>();
        for(int i = 0; i < objects.size(); i++) {
            drawingPane[0].addPolygon(new Polygon(...));
    }to add some stuff to draw but still nothing visible.
I hope this is enough code to find the problem. As I said, when I omit the tabbedPane and add the scollPane directly everything works fine.

Similar Messages

  • "Merge into" statement doesn't work

    Hi Reader,
    It seems that in some of our installed machines merge into statement doesn't;t work. We've already experienced this issue on databases installed within virtual machines, but also found on other configurations sporadically.
    Using statement match a single/multiple records (according required logic)
    statement:
    MERGE INTO RNCATEGORIES CV
    USING dual ON
    ( CV.DESIGNCENTERID = in_DESIGNCENTERID
    AND CV.CADPACKAGENAME = in_CADPACKAGENAME
    WHEN MATCHED THEN
    UPDATE SET
    PKGCATEGORYID = in_PKGCATEGORYID,
         UserPackageType = in_UserPackageType
    WHEN NOT MATCHED THEN
    INSERT VALUES ( in_DESIGNCENTERID,
    in_CADPACKAGENAME, in_PKGCATEGORYID,in_UserPackageType );
    Table script:
    CREATE TABLE RNCATEGORIES
    DESIGNCENTERID RAW(16) NOT NULL,
    CADPACKAGENAME NVARCHAR2(64) NOT NULL,
    PKGCATEGORYID RAW(16),
    USERPACKAGETYPE NVARCHAR2(64)
    PK_RNCATEGORIES PRIMARY KEY (DESIGNCENTERID, CADPACKAGENAME)
    Thanks in advance,
    Amir

    After creating the table, your merge statement gives me
    SQL> MERGE INTO RNCATEGORIES CV
      2  USING dual ON
      3  ( CV.DESIGNCENTERID = in_DESIGNCENTERID
      4  AND CV.CADPACKAGENAME = in_CADPACKAGENAME
      5  )
      6  WHEN MATCHED THEN
      7  UPDATE SET
      8  PKGCATEGORYID = in_PKGCATEGORYID,
      9  UserPackageType = in_UserPackageType
    10  WHEN NOT MATCHED THEN
    11  INSERT VALUES ( in_DESIGNCENTERID,
    12  in_CADPACKAGENAME, in_PKGCATEGORYID,in_UserPackageType );
    AND CV.CADPACKAGENAME = in_CADPACKAGENAME
    ERROR at line 4:
    ORA-00904: "IN_CADPACKAGENAME": invalid identifierwhich is about what I expected. The USING clause requires a select statement, not just a table name. It looks to me like this merge statement is in some kind of stored procedure, and that the in_XXX are variables passed to that procedure. If this is correct, then your merge needs to be more like:
    MERGE INTO rncategories cv
    USING (SELECT in_designcenterid dcid, in_cadpackagename cpn,
                  in_pkgcategoryid pcid, in_userpackagetype upt
           FROM dual)
    ON (cv.designcenterid = dcid and
        cv.cadpackagename = cpn)
    WHEN MATCHED THEN
       UPDATE SET
       pkgcategoryid = pcid
       userpackagetype = upt
    WHEN NOT MATCHED THEN
       INSERT VALUES (dcid, cpn, pcid, upt);John

  • Minimize into applications doesn't work

    I've just noticed that the 'Minimize Into Applications' feature in the Dock System Preferences doesn't work in 10.6.1. Instead, each window is minimized on the right side of the Dock as it did in Leopard. Is anybody else noticing this problem?
    Plus, whenever I launch an application, its icon in the Dock doesn't work properly. It doesn't show the white triangle underneath it, and Dock Exposé doesn't work.

    Do you have any 3rd party apps that attempt to modify the Finder or Menus, etc.?
    If so, confirm they are compatible with Snow Leopard, install updates or remove them, etc.

  • Exporting 3D Camera data into C4D doesn't work properly.

    When I export from AE into C4D, the resulting file data doesnt seem to work properly. I have weird rotations where there shouldn't be and the camera shakes all of the place.
    I have installed the C4D Importer Plug in from Maxon but just using the CIneware Exporter plug in that comes with AE CC 14.
    Any thoughts why it doesn't seem to be working correctly.
    C

    same problem here, with a camera linked to a null object, which is actually moving, not the camera.
    In C4D (R14 studio) the movement goes wild, i's not what it's like in AE CC2014
    Anyone please ???

  • Drag and drop from Lightroom into Premiere doesn't work in Windows

    I recently switched from OSX to Windows and noticed that in Windows, I'm unable to drag and drop from LIghtroom into Premiere. In OSX, it worked fine.
    I do this a lot because it's a time saver. I basically use lightroom to find the photo or video clip I need for my editing project and then just drag in right on to the Premiere timeline. Now I have to do the extra step in Lightroom of "show in explorer", then drag the file from explorer to Premiere. Not really a big deal but just curious why it works in OSX and not Windows.
    I'm running latest Windows 8.1, Lightroom 5.4, Camera Raw 8.4, and Premiere Pro CC 7.2.2 (33)
    -Pete

    Hi Pete,
    You can obtain scripts here:
    http://www.robcole.com/Rob/ProductsAndServices/MiscLrPlugins#MiscScripts
    You'll have to edit lua code to adapt for Premiere. Not that hard really (e.g. clone, then change the script name and path to executable..), but may be too intimidating for some folks. If you are one of those folks, go for the plugin instead - it's usable via GUI - no lua code - can probably accomplish the same thing.
    http://www.robcole.com/Rob/ProductsAndServices/OpenInWhateverLrPlugin
    Let me know (outside the forum please) if problems - thanks,
    Rob

  • Uploading Safari images into 'Blackboard' doesn't work.

    I am using an iMac G5, OS X (10.4.8), 2Ghz PowerPC with 512 MG of RAM.
    I am able to successfully create .html files with various programs (Nvu, Dreamweaver, Mozilla,) and I can open those documents and see the images in them in my default Safari browser (as well Explorer, Firefox, Mozilla,). I USED to able to upload those documents successfully into the 'Blackboard' program my college uses. Here I can't be helpful: I did something -perhaps changed my browser from Netscape Navigator to Safari, but I can't guarantee that's the problem- so that the uploads show the text but no longer load the images. When I open the documents in the Blackboard program, the images don't show as broken, they show as question marks in a small blue square in the center of the missing image.
    I have tried the Blackboard help site, and all the image-loading recommendations I see on this forum. I've tried going to 'Safari> Preferences> Appearance> Display images when the page opens' and making sure that box is checked. I've tried finding 'Safari> File> Publish as> and making sure images are published, but I can't find that option on my Mac. None of the tech support at school can solve the problem -though the process supposedly works just fine on a PC. I have struggled with this for months, and since I teach art history and need to show images, it is making my life miserable. Any help would be much appreciated.
    Carolyn
    iMac G5   Mac OS X (10.4.8)   PowerMac8,2

    Thanks for the rapid response! A pity I don't have the language to be of more help.
    First, 'Blackboard.edu' is a service institutions of education subscribe to. Faculty users publish their class webpages, and can keep those inhouse or make them available to the www. So, I've been publishing web pages (in house) for my classes for years. This year I've run into problems with getting my .html documents to load the images contained in them. I do believe my colleagues have uploaded my documents successfully onto their Blackboards via PCs, leading me to believe this is a Mac problem . . .
    Someone suggested this was a browser problem, so I kept trying different default browsers, searching their preferences for any boxes that needed to be checked to allow images. Each time I upload I am told the upload was sucessful -I get no error messages- and each time the images don't load.
    I defaulted to Safari and did as you suggested, and there was a slight change. Instead of the blue-box question mark, the image title was displayed, but still no image.
    iMac G5   Mac OS X (10.4.8)   PowerMac8,2. / 2 GHz PowerPC

  • Importing MP4 into Premiere doesn't work for me

    Hi, I am trying to import some MP4 videos into Adobe Premiere 2, and I can't get it to work despite installing Quicktime. Can you help fix this for me?
    thanks

    I do not know if Pr 2.0 had any HD support. I kind of doubt it.
    Now, one workaround would be to use QuickTime Pro (~US29 upgrade/unlock) and convert that footage to SD with DV-AVI Type II w/ 48KHz 16-bit PCM/WAV Audio. You will obviously be converting HD (probably) to SD, but it should allow you at least edit.
    For the MP4, which is usually some flavor of H.264, folk have found that certain versions of H.264 work better than others. Some like the Apple CODEC, some the Lead CODEC and some the MainConcept H.264 CODEC.
    Good luck,
    Hunt

  • Saving scripts into repository doesn't work in UCCX 8.0 Editor

    In UCCX 5 and 7 you could open scripts from repository in Editor running on any machine, and you could save them to repository also. In UCCX 8, I'm only able to open scripts from repository, but not save them, I get an error. TAC claims that this is by design in UCCX 8 with some strange explanation:
    "in the version 7.x  u should be able to save the file directly to the repository as the files path can be mapped directly from your PC but not in version 8.x"
    For some unknown reason this only affects savings scripts, but not opening. I'm trying to get TAC to create a bug.
    Has anyone been able to save scripts in 8.0 editor through repository?

    I experienced this. Check to see when you login to the Editor that you're using the exact case-sensitive version of your username. If you're in the directory as JohnSmith, you can successfully auth as johnsmith but saving scripts to the Repository blows up. If you auth as JohnSmith it works.

  • Why CONCATENATE String2 '*' INTO String1 doesn't work?

    hi ABAP experts,
    We would like to get a wildcard string by using Concatenate and then in select statement.  But when we activate the following simple statement, get the following error:
    Statement is not accessible. at the Concatenate statement.
    Below is the simple piece of code:
    data: String1 TYPE C.
    parameters:String2 like EKPO-EKORG.
    CONCATENATE String2 '*' INTO String1.
    select EBELN EBELP MATNR MENGE from EKPO into table item_itab
         Where MATNR like String1.
    <REMOVED BY MODERATOR>
    Edited by: Alvaro Tejada Galindo on Mar 6, 2008 10:39 AM

    data: String1 TYPE C.
    parameters:String2 like EKPO-EKORG.
    Start-of-selection.
    CONCATENATE String2 '*' INTO String1.
    select EBELN EBELP MATNR MENGE from EKPO into table item_itab
    Where MATNR like String1.

  • I am locked out of my account because my password includes "[" and my computer is set to spanish. In spanish that key doesn't work. How do I gejt back into my computer?

    i am locked out of my account because my password includes "[" and my computer is set to spanish. In spanish that key doesn't work. How do I gejt back into my computer?

    If the user account is associated with an Apple ID, and you know the Apple ID password, then maybe the Apple ID can be used to reset your user account password.
    Otherwise*, boot into Recovery by holding down the key combination command-R at startup. Release the keys when you see a gray screen with a spinning dial.
    When the OS X Utilities screen appears, select
    Utilities ▹ Terminal
    from the menu bar.
    In the Terminal window, type this:
    res
    Press the tab key. The partial command you typed will automatically be completed to this:
    resetpassword
    Press return. A Reset Password window opens.
    Select your boot volume if not already selected.
    Select your username from the menu labeled Select the user account if not already selected.
    Follow the prompts to reset the password. It's safest to choose a password that includes only the characters a-z, A-Z, and 0-9.
    Select
     ▹ Restart
    from the menu bar.
    You should now be able to log in with the new password, but your Keychain will be reset (empty.) If you've forgotten the Keychain password (which is ordinarily the same as your login password), there's no way to recover it.
    *Note: If you've activated FileVault, this procedure doesn't apply. Follow instead the instructions on this page:
    If you forget the password and FileVault is on

  • I can't seem to get my iMac (late 2009 model) into automatic sleep mode.  If I manually put it into sleep I don't have any issues.  I used to solve the issue by running "PleaseSleep" application but that doesn't work anymore since Lion.

    I can't seem to get my iMac (late 2009 model) into automatic sleep mode.  If I manually put it into sleep I don't have any issues.
    I used to solve the issue by running "PleaseSleep" application but that doesn't work anymore since Lion. I now want to fix the underlying problem.
    I'm not running any weird background processes and in my energy saver settings I've tagged "put the hard disk to sleep when possible:, "allow power button to put computer to sleep" and "automatically reduce brigthness". All pretty standard.
    Is there anyone who can give me some pointers ?

    Today I solved the same problem for my iMac running Snow Leopard. See https://discussions.apple.com/thread/3008791#15947706. The method may help you, too.
    For me it was the DynDNS Updater preventing my iMac from automatically entering sleep mode.
    To my knowledge the cause of this sleep problem can only be a peripheral device or a process. So I suggest to first unplug all peripherals and test whether that's the cause. If not, I suggest to terminate one process after another and to test automatic entering of sleep mode after each. Start with user processes; continue with system process if necessary.
    At least that's the way I found the offending process. Fortunately, I was able to change the configuration of that process to allow again automatic entering of sleep mode.
    Good luck!

  • MY IPOD APPEARS TO BE ZOOMED INTO THE SCREEN AT ALL TIMES, MAKING IT DIFFICULT TO DO SIMPLE TASKS SUCH AS GO BACK, OR SELECT A PLAYLIST, ETC. I'VE TRIED PULLING IT OUT WITH MY FINGERS BUT THAT DOESN'T WORK. PLEASE CAN YOU HELP!!! THANKS.

    I've got a touch iPod and for about a week now it's almost been permenently zoomed into the screen? I actually cannot get it to zoom back out. I've tried pulling the screen out with my fingers but that doesn't work. It's zoomed in on my home pages, on my music, settings everything! It makes simple things like deleting a number from my password login extreamly differcult. Please can someone help?!?! Thanks.

    Double tap the screen with three fingers to un-zoom.
    Then go to Settings > General > Accessibility > Zoom and turn this OFF.

  • BitmapData draw method doesn't work when the project is published as the .swf file of the web applic

    Hi,
            I am totally confused by this strange error. When I tried using the draw method of BitmapData to draw a movieclip symbol of my project, it seems to work fine locally. However, as I uploaded the published .swf file to my web server and launched it as the plugin of my web application, it failed. The source codes as follows,
    function printscreenClicked():void
         //ExternalInterface.call calls a javascript function to print message1
        var bd:BitmapData = new BitmapData(stage.width,stage.height);
        //ExternalInterface.call calls a javascript function to print message2
      bd.draw(stage);
        //ExternalInterface.call calls a javascript function to print message3
    message3 didn't show at all. Instead, the browser console shows "Uncaught Error: Error calling method on NPObject.". My understanding of this error message is that the .swf is calling something crashing, and I believe that bd.draw(stage)is the crashng method call.
    Also, here is my html embed tag:
        <embed src="/tests/videoplayer.swf" id="flash" quality="high" height="510" width="990" scale="exactfit" name="squambido" align="middle" allowscriptaccess="always" allowfullscreen="true" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" style="margin: 0px auto;clear:both;position:relative;"/>
    Can someone help me?

    Thank you for your reply.
    I tried stageWidth and stageHeight, but it still doesn't work.
    The draw() methid is triggered when I clicked a screenshot button in my application as follows,
    ExternalInterface.addCallback("printscreenClicked", printscreenClicked);
    function printscreenClicked():void
         //ExternalInterface.call calls a javascript function to print message1
        var bd:BitmapData = new BitmapData(stage.width,stage.height);
        //ExternalInterface.call calls a javascript function to print message2
      bd.draw(stage);
        //ExternalInterface.call calls a javascript function to print message3
    Would you please give me an example of "waiting for Event.RESIZE is good, or just at least Event.ENTER_FRAME"?
    My real purpose in this application is to capture a snapshot of a streaming video. The video is contained in a movieclip object. I tried stage first since BirmapData.draw() doesn't work when drawing the movieclip on the web site. Do you have any suggestion for this situation? Also, is there any good method to find out what happened if the browser have "Uncaught Error: Error calling method on NPObject."?

  • How do I use my ipod in the car without it constantly charging?  I have to use a docking cable into the USB port because the 3.5 mm to 3.5mm jack I bought doesn't work on the ipod.

    How do I use my ipod in the car without it constantly charging?  I have to use a docking cable into the USB port because the 3.5mm to 3.5mm jack I bought doesn't work with the ipod (although it does work with an MP3 player).  My ipod is a 5th generation 80GB classic.

    I know this is old - but did you ever get this working. Thinking of getting a 780 ti card and I have an older mac with the mini-displayport too.

  • I would like to copy all the songs from one Ipod into another. All the songs are into my Itunes account, I tried to drag and drop the songs from the old Ipod to the new one but it doesn't work. Is there a way to do it ?

    Hello everybody,
    I would like to copy all the songs from one Ipod into another. All the songs are into my Itunes account, I tried to drag and drop the songs from the old Ipod to the new one but it doesn't work. Is there a way to do it ?
    I share one Itunes account with other people from my family and one person would like to keep the same songs on the new Ipod as the ones which were on the old one.
    Thanks in advance for your answer.
    Yan

    Hello Chris,
    Thanks for your answer. I was hoping for an easier answer. Too bad there is no drag and drop solution, it would have been much easier.
    Thanks for answering so fast.
    Bye.
    Yan

Maybe you are looking for

  • Add mp3 to iTunes, delete file from Downloads, add Grouping?

    Can anyone help me make an Applescript (or it may need to be two) that can be used as a folder action to watch the Downloads folder and: 1) Open .mp3s in iTunes and set track Grouping ID3 field to 'singles', then delete original .mp3s. 2) Open .zip a

  • Cannot open nef files from my d7100 nikon to edit in photoshop

    Hi I am using lightroom 5 and photoshop cs5 with my nikon d90 i could edit in photoshop, now with my d7100 photoshop opens but the picture doesnt . i have checked all updates and they say i am up to date . camera raw seems to be at 6.7 and i dont kno

  • Batabase Backup take a lot of time to finish

    Hi, I am new in Analysis Services, and my first work will be backup all my databases, I found one database that in estimated size says 1.8 MB, but the backup processes has been run about  30 minutes, in my instance have other databases with size over

  • Change the demical point in layout create PO in field net price

    hai frineds, can we extend the net price decimal point form two to 4 decimal point?

  • SMC cannot start anymore

    Hello, we have installed 5.10 on a i86pc. After doing updates with the updatemanager smc is not starting anymore. I got an font warning "Unable to load any usable ISO8859-1 font" and a following java error from this. I get this with both x-interfaces