Strange behaviour with JTabbedPane

Hi all,
I'm making an application where I need to use a JTabbed pane. My problem is that I need to include a heavyweight AWT component on one of my tabs, and what's happening is this heavyweight component is appearing 'on top' of the JTabbedPane. This i could understand because it's a heavyweight component, but something weird happens when I switch tabs...
If I click on Tab2 (where the heavwight component is displayed), and then click back on Tab1 then it no longer appears 'on top' of the jtabbedpane. Does anyone know what's going on, and even better, how I might fix this?
Many thanks,
BBB
Here's an exmaple of whats happening (notice Button4 is an AWT button):
import javax.swing.*;
import java.awt.*;
public class SimpleTab  extends JFrame{
    public SimpleTab()
        JButton oButton1 = new JButton("Button 1");
        JButton oButton2 = new JButton("Button 2");
        JButton oButton3 = new JButton("Button 3");
        Button oButton4 = new Button("Button 4");
        JPanel oPanel1 = new JPanel();
        JPanel oPanel2 = new JPanel();
        oPanel1.add( oButton1, BorderLayout.NORTH );
        oPanel1.add( oButton2, BorderLayout.SOUTH );
        oPanel2.add( oButton3, BorderLayout.EAST );
        oPanel2.add( oButton4, BorderLayout.WEST );
        JTabbedPane oTabbedPane = new JTabbedPane();
        oTabbedPane.add( oPanel1, "Tab1" );
        oTabbedPane.add( oPanel2, "Tab2" );
        this.getContentPane().add( oTabbedPane );
    public static void main ( String [] args )
        SimpleTab oTabP = new SimpleTab();
        oTabP.pack();
        oTabP.show();
}

Advice: Please don't mix AWT with Swing components.
JPanel uses the default FlowLayout, so it's suffice to just code:
oPanel1.add(oButton1);Or you could do something like this:
JPanel oPanel1 = new JPanel(new BorderLayout());
oPanel1.add(oButton1, BorderLayout.NORTH);

Similar Messages

  • Strange behaviour with Safari.

    Very strange behaviour with Safari this morning.   Pages loading piecemeal or partially.   The content only becomes viewable after the cursor has passed over the area.   Have cleared caches and reported it but I'm wondering if this is a local matter here in the UK.   Anyone suffering similar problems?    Firefox is responding perfectly normally.

    I see a reply has come back via a previous post.   As I am trying to get a response to this one I shan't reply there but I should point out that for me, this is an isolated problem.   I do use open DNS but with no track history of problems there , I can't blame that.
    In the last few minutes normality has returned.

  • Strange behaviour with nested overflow headers

    Hi there,
    I have a strange behaviour with nested overflow headers. I have a hierarchy with some dynamic tables an several headers for the hierarchy steps. When the table entries lead to an page overflow, I would assume, that all parent headers will be shown. But unfortunatley only the last (the deepest in the hierarchy) defined overflow header will be shown. Here you can see a quick example of it. (http://www.nemonon.de/HeaderProblem.xdp)
    Any help would be very welcome.
    Thanks and greetings,
    Joerg

    That will sure work for some requirements and thanks for the ideas. But this would fail for the second table. Perhaps my example xdp only shows the behaviour of the nested overflow headers and it´s structure is reduced to show that. The real situation is a bit different. The parent containers also contain some other content. The Problem is not the table...I've just chosen it to produce some content and another nested header. Just try to uncheck the overflow header of the table. This will lead to, that the next defined header (in this case "HeaderThree" is shown. When you go on by also disabling that header, the next one will be shown...and so on. This shows, that the headers for their own are functional, but they fail in combination.
    Greetings,
    Joerg

  • Strange behaviour with Subjective Assessments comments in SSM10 SP10

    Good day community,
    We have strange behaviour with Subjective Assessments comments in SSM10 SP10.
    We have been using this successfully for 3 quarters.
    The scenario is as follows.
    Business users capture Subjective Assessment comments successfully and these can be viewed on the scorecard overview for Q3. This can be printed to PDF successfully as well.
    A few hours later, when the user accesses the Scorecard Overview, the Q3(March 2014) comments are now replaced with the
    Q2(Dec 2013) comments. 
    This has not happened previously. We have recently deployed Internet Explorer (IE) 10 to some of the machines that previously used IE9 or IE8. Could this be a contributing factor?
    This has happened with one database on 2 contexts.  Although the database/scorecard in question has been created on SSM10, we have recently upgraded the rest of the organisation onto SSM10 from SSM7.5 but those are completely separate databases.
    We have not found a pattern yet, but there is only one assigned administrator for this database and she often has 'funny' things happen on her machine. Could it be possible that there's a virus on her machine? Or maybe there's a sequence or combination of steps that she's doing that could cause this? We have not been able to recreate the situation in our developer offices.
    Any ideas on this strange behaviour would be appreciated.
    Regards,
    Natasha

    Hi everyone,
    We have since noticed that if you go into the Administrator > Context Management > and change the "Person Responsible" and then save, once you go back to the Scorecard Overview all the Q3 comments have been overwritten with the Q2 comments.
    This happened on a different machine so it seems there could be a bug in the Administrator.
    Any thoughts on this strange behaviour would be appreciated.
    Regards,

  • View Master mode strange behaviour with jpg files

    Hy all,
    I'm using Aperture, and I'm tweakin a lot the SW to discover all secrets ....
    I'm really concerned about a strange behaviour of the SW in view mode.
    If I open a jpg file, do not apply ANY modification, and apply the "show master" command (pressing M), there's a subtle behaviour :
    *the images get sharper !!!!*
    It behaves as if an "edge sharpening" was applied !!!!!!
    With _RAW files this thing doesn't happen at all._
    Even stranger, if I zoom to full definition (by pressing Z), and toggle between normal view and "show master" view, the immage remains the same !
    The effect is not so evident with all images, but sometimes it is !!
    Anyway, I expect not to have such kind of things with a professional SW.
    With professional cameras and good quality files it's really annoying not to beeing sure what's the REAL content of the jpg image.
    Has anyone noted this thing ? Is there a reasonable explanation ?
    The only one I tried to figure out is the following : may be Aperture applies some kind of resampling algorithm with jpg files (bicubic, bilinear, etc).
    May be this resampling is not applied with 100% magnification, as weel as with raw files.
    But it's only my guessing. Now, I'm tweaking other viewers and other SW to understand what's the real jpg image stored in the file : the blurer one form normal view or the sharper one with "show master" mode.
    I stress once again : of course, the jpg file I'm talking about have no settings at all, just imported and toggled with M button.
    Thanks in advance.
    Regards,
    Enzo

    Hy,
    I'm afraid I'm not been clear.
    The problem is this :
    1) jpg image opened in normal view mode, no zoom, (no quick preview, of course) : image with a certain amount of blour
    2) jpg image opened in show master mode, no zoom, (no quick previre, of course) : image SHARPER with respect with the previous.
    No edit applied from import, so "show master" command shouln't apply any change in rendering, should it ?
    The only thing I said on 100% view is that such difference (between normal mode e show mastermode) is not present with 100% magnification.
    That was the issue.
    Enzo

  • IPhoto: strange behaviour with preview thumbnails

    Is there a simple way in iPhoto 8 to rebuild the thumbnail database?
    I recently noticed a strange behaviour iPhoto 8 has with previews: In some of my event categories, iPhoto does not display the correct preview thumbnail of the picture, but a preview thumbnail of another event. When I click on the thumbnail, it reloads the appropriate preview and it does not happen again - with that picture. Also, if I double click an event to open it, the small thumbnail of the event's key photo that is to be displayed in the title bar (next to the All Events button) is not always correct.
    Thank you for your help!
    Stefan

    I have similar problems (lately) with iPhoto 6.0.6 -- thumbnails do not equal the images they 'thumbnail' of.
    Sometimes when it opens, it (recently) asked me to rebuild the thumbnails, but not always.
    Can I force a thumbnail rebuild using the command you gave - Apple-option while opening iPhoto? In iPhoto 6.0.6 this primarily forces a new selection of a library.

  • Strange behaviour with Slideshow placement since upgrade to 3.2 from 3.1

    Hello, since I upgrade from 3.1 to 3.2, I have some strange behaviours but in particular with the placement of a slideshow on a new page.  It is not displaying in the same position as I have in in Design.  It is way off and going up over my menus when I look at it in Safari or Chrome.  Does anyone know how to fix this or could it be a bug?

    Ben,
    When you upgrade, only apex_030200 will be created and that will use the tablespace you specify. It does not have to be the same one used by flows_030100.
    Scott

  • Strange behaviour with smart music list in iTunes

    I don't know how is the name of this list in english. In portuguese iTunes calls "Lista Inteligente". So, I eddited a list to show all musics never played up to 100 months ago. If I click on a music in this list, before it plays, the music disappear from the list as it would be played and nothing will be played. And so one, the next and etc. No date is shown in "last play" but the music isn't anymore to see in this List.
    This list works well for many years but suddenly I have this strange behaviour.
    could it be something wrong with new update? Now I have iTunes installed 11.3.0.54

    Click the gray disclosure triangle in front of the iPod touch name.
    Thus I cannot do any functions with the music on my iPod - such as delete songs, update song info, etc.
    I would suggest making any changes to songs in iTunes and then transferring the songs to the touch.
    You can create playlists and autosync on lythos playlists.
    Then add/delete from those playlists, update items in iTunes then plug in the touch to sync it.

  • KYF exhibits strange behaviour with decimals

    Hi everybody,
    a DEC-key figure (IOBJ maintenance: additional properties->BEx->decimal places: Nothing Defined) exhibits strange behaviour regarding the treatment of decimals.
    When looking at the data in the cube (InfoCube maintenance->content) the value is 2,086.
    In the query the result is 2.0900000000 (%).
    Now comes the problem: in BPS (in the buffer) the value is 2,08. The system simply truncates the figure!  This is the value which is also used in the FOX and produces the wrong result.
    I need the system to sensibly round the values correctly to 2 decimals OR work with an additional decimal place.  How can this be done?
    Thanks for any input,
    Martin

    Hi,
    In the manual planning, while designing the layout, there is a setting in data columns tab called decimals. You have to insert 2 under this. Then in the layout data will be displayed with 2 decimal places.
    Hope this helps.
    Regards,
    Isha

  • FF 4 (mac) doesn't display handcursor in all Flash websites. Also all html websites show strange behaviour with cursor. (blinking cursor in nearby div after clicking a button)

    I'm running Mac OS 10.6
    FF4 doesn't display the hand cursor or type cursor in '''all''' flash websites on links/textfieldss when it should. Highly annoying and disgracing all flashcontent.
    Also with html websites I experienced strange cursor behaviour with FF4. Although it's hard to reproduce the problem. It's very inconsistent.
    I have the feeling in general FF4 should look into it's cursor behaviour on all possible platforms. Mainly Flash.

    I replicated the typing cursor problem on the popular FB. Just click e.g. "x people like this", you'll see you get a blinking type cursor in the "close" button.

  • Strange behaviour with shorthand null check

    Today I had a strange occurance of a NPE with that code:
    SomeType type = (person.getType() != null ? TYPE1 : _ TYPE_2);
    When person is not null but person.getType() returns null, I always faced a NullPointerException. Changing the code to
    SomeType type = (person.getType() == null ? TYPE2 : _ TYPE_1);
    solved the problem and worked. I'd like to know if anyone here can explain this strange behaviour.
    Regards
    PantheraOnca
    Edited by: user4174452 on 05.07.2012 22:22

    Of course, your right. Wrote the original code in the office and just wanted to explain the "obscurity" by pseudo code.
    The original would not have been more explanatory, I think.....
    (TYPE_1 and TYPE_2 were originally enums and SomeType a suitable class)
    The point is that the check threw a NPE in the first case and worked in the second. You might reproduce this with arbitrary code. Will provide the Java-Version tomorrow....

  • Strange behaviour with firefox

    In all my flash movies I've a strange behaviour that happens
    only whit Mozilla Firefox.
    When I go over a clickable area it just doesn't work and it's
    located lower than expected,
    with Internet explorer and opera I don't have this problem.
    The clickable areas are movieclips with on(release) script
    set.
    thanks

    Are you using a percentage size of the flash object? E.g.
    height=100%?
    This is known to cause problems. You could omit those by
    setting the height of the <body> tag to 100%, too (weird, I
    know). Or delete the very first line in the html document, the one
    that sets the doctype

  • Strange behaviour with combo boxes.

    Has anyone else noticed strange behaviour of combo boxes with applets?
    What happens is that on selecting the combo drop down, the dialogue the combo is sitting on moves behind its parent window. You just end up seeing the combo list, and no dialogue. Select a combo item, and sometimes the dialogue reappears, and sometimes it is still hidden.
    I've only seen this whilst running an applet in browsers. In Eclipse I don't see the behaviour.
    The behaviour is also very intermittent.
    I'm using Java Plug-in 1.6.0_10-rc2, Using JRE version 1.6.0_10-rc2 Java HotSpot(TM) Client VM, on Windows Vista, Google Chrome browser.
    I'd raise it as a bug, it certainly seems quite serious, but I don't have a reliable test case.
    I have a work around, on all my dialogues with combo's on them, I have setAlwaysOnTop(true). Not really the correct behaviour though.

    GeoffTitmuss wrote:
    No, I believe I am just using Swing components.Ok, then I'm out of ideas

  • P43-Neo Strange behaviour with LG IDE/PATA DVD Burner attached

    Hello, I have spent several hours installing an OS on my new MSI P43 Neo-F v1.0 Bios v1.9:
    - 1x 1000 GB SATA HDD Seagate
    - 1x DVD Burner LG IDE/PATA HL-DT-ST_DVDRAM_GSA-H42N Firmware RL01
    - 4GB OCZ Gold
    - MSI RX2600 Graphic Card
    - Bequit! Power Supply 350 Watt
    Trying to boot from the DVD Drive works, but either XP not Vista could make it to the setup screen.
    - Vista stops after some seconds with an unexpected I/O error.
    - XP Setup just crashes and dumps register values.
    Boot from USB memory stick (DVD still attached but no DVD in) lets you enter the setup and select the HDD as intall target. But, if you click "next" it gives you a message that Vista could not verify if a suitable system disk is installed.
    I could only solve the problem by completely disconnecting the GSA-H42N DVD Burner from the IDE/PATA connector.
    I could install Vista now from USB.
    After Vista was installed I reconnected the GSA-H42N DVD Burner to the IDE/PATA connector and could install software etc.
    Anyone being able to comment on this very strange behaviour ?
    In conjunction with other boards I did not encounter issues like this with that LG DVD Burner.
    It has shown that with the MSI P43 Neo F the LG GSA-H42N is unable to boot any CD/DVD. Linux for example stops booting with image crc check error.
    I have now swapped the LG GSA-H42N with an GSA-H10N from my other machine and it can boot any CD/DVD from it - everything runs fine.
    The LG GSA-H42N now runs with my other machine (with an Asrock P43 DE motherboard) also without any problems it can boot any CD/DVD from it
    Thank you,
    CPU

    Please post your Full System Specs with PSU specs amps.
    >>Posting Guide<<

  • Strange behaviour with HTTP RFC Connection

    Hi Experts,
    today I investigated a strange behaviour in our SAP environment. I tried to create a HTTP RFC connection (SM59) from our integration server to a locale integration engine in our test environment.
    http:<server>:<port>/sap/xi/engine?type=entry
    A few days ago I do the same for the development environment and all works fine.
    For test purposes I used my user for the connection but when I tried to test the connection (test button) the authentification fails. After a few attempts my user was locked on the target server. (I called a admin to unlock my user).
    My first idea was that there is problem with the URL or something in this way. So I do a test within the browser and type in my user again. The result was - as aspect - a soap message that an empty message can not be processed.
    My second idea was that there are troubles with the authorization so I used a system user for the connection. I test the connection and received a message that the user has not enough rights to send messages to the locale integration server.
    So I came to the result that I mistyped my password due the first attempt. I try again and I was really very carefully by typing my password. I press the test button and it fails with the message that I could not logged on to the system. I try it many times and it always fails.
    Finally I use the system user and attach the required roles to the user.
    But has anybody an idea why it was not possible to use my user? I really don't understand it since it works fine in the development environment.
    Björn

    what is the version of SAP system in dev and test environments.......
    Some older version SAP systems(4.6 version) require passwords in CAPITALs....
    Edited by: Praveen Gujjeti on Mar 17, 2009 5:05 PM

Maybe you are looking for

  • Different shapes for symbols in line graph

    I can't figure out how to change the default square data points in a line graph.  When I try to got to Object>Graph>Marker it is greyed out.  When I click on a circle symbol and then try to go to Object>Graph>Design, it is greyed out.  I am so frustr

  • Share file to web site

    I'm trying to export (aka "Share") a FCPX video clip ~2.5 minutes long to a web page for playback by either a Mac or a PC. What I would really like is a small *.mp4 video file. Note: The desired output only needs to be something similar to a YouTube

  • Get Managed bean name while running tests.

    hi, while running web application,i can able get managed name. but how to get managed bean name while running unit tests. thanks siva

  • Probleme mit Diadem 9.1 VIEW

    Beschreibung der Fehlfunktion: - Corsur kann nicht gewechselt werden - Layout kann nicht gewechselt werden - Daten werden nicht dargestellt Das Klicken von Schaltflächen und Iconen wird dargestellt, aber nicht ausgeführt

  • Static/Dynamic NAT Conflict

    My static NAT configuration is somehow conflicting with my dynamic NAT configuration. Am I doing something wrong? ip nat inside source list 1 interface GigabitEthernet0/0 overload access-list 1 permit 192.168.126.0 0.0.0.255 access-list 1 permit 10.1