Component always displays "under" other components......

Hi there,
I have a component derived from a "panel" - I'm adding it to the applet but it always displays itself "under" the other components in the applet, never above (which is where I want it).
I've tried adding it last and adding it first - doesn't make any difference. When I add the component I set it to "setVisible(false)" and "setVisible(true)" when the user clicks a button. I'm a bit confused as to why its underneath everything else!
Any ideas?
Thanks.

I am using my own paint methods indeed - I mean I'm calling "super" and then rendering the component - or calling "super" in a container component and rendering other stuff on the container afterwards.
But this is all working on the version you see on the website - the one I'm working on is broken.
btw. I'm using a "Panel" (derives from Container, its a lightweight thingy, nout to do with Schwing etc.).

Similar Messages

  • PApplet/component is always above all other components except...

    Hi,
    I am working with java and a program off shoot of Java called Processing. Processing aids in the creation of java and it integrates itself into a swing component by extending into a PApplet(Processing�s version of an applet) which a JFrame sees as a component.
    Example:
    newJFrame.add(PApplet); <--- works perfectly except�
    The integration of java/swing and processing in an application works very well except for one problem. The Processing class (PApplet) draws to the screen and when I put it into a JFrame, JPanel, JInternalFrame, etc � the graphics are always above all other component except the JMenuBar. I found a fix for the JMenuBar to be this line of code �JPopupMenu.setDefaultLightWeightPopupEnabled(false);� I guess it tells the popup manager of the JMenuBar to not setDefaultLightWeightPopupEnabled which in turn, allows the JMenuItems to popup above the PApplet.
    Is there a way to force the PApplet/component to follow the rules of all other components? (setComponentZOrder, setLayer, etc�) It works for the JMenuBar so I feel it should be able to work for all other components � is there a way?
    Thanks,
    4dplane

    Thanks for the info; I believe you hit the nail on the head. Processing is open source so I looked in the PApplet class and it extends Applet, so this means processing is awt based.
    Thanks,
    4dplane

  • Adding Component to JFileChooser excludes other components

    I want to add a JComboBox component to a JFileChooser but when I do, the default components that are supposed to be in that space don't show up.
    For example, in the JFileChooser, there are several components (like the accept and cancel buttons) in the SOUTH area of the BorderLayout. When I add a custom combobox like so:
    JFileChooser fc = new JFileChooser();
    cb = new JComboBox();
    fc.add(cb, BorderLayout.SOUTH);
    dialogResult = fc.showSaveDialog();the combobox I added is the ONLY component which shows up in the SOUTH area.
    I have tried adding the combobox as an accessory, but it always shows up to the right of the file browser window. If I can control where the accessory shows up, that would be fine, but I don't see any way to do that.
    I don't understand why the other components wouldn't show up?
    Thanks in advance for any help.

    fc.add(cb, BorderLayout.SOUTH);
    This line replaces the components that were
    previously in that space - read the tutorial on
    BorderLayout. In addition, this code is very brittle
    and you can have no guarantee that it will work under
    different look-and-feels and in future versions of
    JDK, since you're making some far-fetching
    assumptions on the internal implementation of the
    file chooser dialog.Thanks very much for the help!
    Fundamentally, i did not realize that in BorderLayout you may only set ONE component to each area (NORTH, SOUTH, CENTER, etc.).
    Once I understood that, I grabbed the component at the bottom of the filechooser and placed it in a JPanel with the components I wanted to Add to the bottom.
    This worked perfectly!
    I am uncertain, however, about why you say the code is "brittle" and what you mean by making assumptions regarding the internal implementation.
    In any case, thanks again for your help!
    For anyone else who is interested, here is what the code looks like
    JFileChooser fc = new JFileChooser();
    JComboBox cb = new JComboBox();
    JPanel panel = new JPanel();
    BoxLayout box = new BoxLayout(panel,BoxLayout.Y_AXIS);
    BorderLayout layout = (BorderLayout) fc.getLayout();
    panel.setLayout(box);
    Component comp = layout.getLayoutComponent(BorderLayout.SOUTH);
    panel.add(comp);
    panel.add(cb);
    fc.add(panel,BorderLayout.SOUTH);

  • Components aren't displaying under Win2k

    We have a Java Applet which opens dialogs containing lists of data from our database, radio buttons, buttons, checkboxes, text labels etc. Since moving to Win2k, the components sometimes don't paint. This is intermittent and, as near as I can tell, random. The list component always displays. The other components still work, even if not seen (if you know where they are, you can click 'em). They can be "displayed" by manually triggering a repaint (move the dialog off-screen and back, minimize-restore, cover with another window and uncover, etc.) Interestingly enough, sometimes these same activities can cause them to disappear again. Even the background color is among the "components" that doesn't display. I've attempted to code .repaint and .setVisible invocations to "force" painting, to no avail.
    Any assistance you can provide would be greatly appreciated,
    Thanks in Advance
    And now, some gory details:
    We're using JDK 1.1.8 and Netscape 4.x and Netdynamics (which is no longer supported). Due to previous design considerations, we're locked into Netscape. Due to no more upgrades to Netdynamics, and a glitch in Netscape 6, we can't upgrade Netscape, and are concerned about upgrading JDK.
    The original applet was developed with Visual Cafe, contrary to our standards, we don't have Cafe. So fixes are all done in text editor - java compile cycles.
    I'm enclosing some code snips. The first is the method that is called to display one of the dialogs.
    It loads the list, mlistSR, with our data and then makes the dialog visible. I added a this.repaint(), which didn't help, then I tried buttonSelect.repaint(), also didn't work. (At the component level, I am trying to get one component to work, if I see one and not the others, I'll know my technique works and can then apply it to all). I also tried buttonSelect.setVisible(true).
        public void showSRs(String countyCode, String townCode, RouteApplet routeApplet) {
            Vector a0 = routeApplet.routingDB.readA0(countyCode, townCode);
            Enumeration e = a0.elements();
            int r = 0;
            while (e.hasMoreElements()) {
                RASR sr = (RASR) e.nextElement();
                String id = sr.srId;
                String n = sr.srLocalName;
                mlistSR.addTextCell(r, 0, id);
                mlistSR.addTextCell(r, 1, n);
                r++;
            buttonSelect.repaint(); //this.repaint();
            setVisible(true);
        }This is our "creation" of buttonSelect:
              A basic implementation of the JDialog class.
    import java.util.*;
    import java.awt.*;
    import com.sun.java.swing.*;
    import symantec.itools.awt.MultiList;
    import com.symantec.itools.swing.borders.SoftBevelBorder;
    public class dlgSelectSR extends com.sun.java.swing.JDialog
         public dlgSelectSR(Frame parent)
              super(parent);
              setTitle("Select State Route");
              setResizable(false);
              setModal(true);
              getContentPane().setLayout(null);
              setSize(409,380);
              setVisible(false);
              getContentPane().add(mlistSR);
              mlistSR.setBackground(java.awt.Color.white);
              mlistSR.setBounds(6,6,282,366);
              buttonSelect.setText("Select");
              buttonSelect.setActionCommand("Select");
              buttonSelect.setBorder(softBevelBorder1);
              getContentPane().add(buttonSelect);
              buttonSelect.setBounds(306,270,78,30);
    <-snip->
              SymAction lSymAction = new SymAction();
              mlistSR.addActionListener(lSymAction);
              buttonSelect.addActionListener(lSymAction);
              buttonCancel.addActionListener(lSymAction);
    <-snip->
         //{{DECLARE_CONTROLS
         symantec.itools.awt.MultiList mlistSR = new symantec.itools.awt.MultiList();
         com.sun.java.swing.JButton buttonSelect = new com.sun.java.swing.JButton();
         com.sun.java.swing.JButton buttonCancel = new com.sun.java.swing.JButton();
         com.symantec.itools.swing.borders.SoftBevelBorder softBevelBorder1 = new com.symantec.itools.swing.borders.SoftBevelBorder();
         java.awt.Label label1 = new java.awt.Label();
         java.awt.Label label2 = new java.awt.Label();
    <-snip->

    This issue may indeed be caused by video drivers as DrClap asserts. Can it be duplicated on more that one windows 2000 box? If it cannot be duplicated, try "dumbing down" your drivers. In other words use 600x800 resolution with low color settings as a base line from which to diagnose, and find the point at which you have repaint problems.
    If this issue can be duplicated, suspect the fact that you are mixing lightweight and heavyweight controls! Cay Horstman covers this topic fairly early on in "Core Java" second edition. The upshot is that the heavyweight controls will supercede the lightweight Swing controls and clause "weird" repaint behavior as the heavyweight control tries to paint on top of the Swing control.
    Having worked with NetDynamices, I must congratulate you for progressing as far as you have, it was a tenuous platform in my estimation.
    Good Luck in your efforts!

  • Ideas to display which component drives the other components in the canvas

    I have 4 components in my canvas and I would like to learn some ideas from gurus on what are the best ways to display which component drives (drills down)  the other components in the dashboard.  Any info would be appreciated.

    Hi,
    There is no such rule on which component should drive other in Xcelsius. It all depends upon the data that you are using. Always a component with summarized data should drive a component with granular data. For eg: If you are showing Total sales in a country using Column chart and want to drilldown to the percentage of sales in each region of a particular country , you can use pie chart to show it. Here Column chart drives Pie chart and u can show this in other way also.
    Hope it helps!
    Thanks,
    Arun US

  • [svn:fx-trunk] 12878: When sub-components don' t have a tabIndex and when VideoPlayer instance does, assigned tabIndex to each inner-component to ensure that they appear in the correct tab order with other components on the stage .

    Revision: 12878
    Revision: 12878
    Author:   [email protected]
    Date:     2009-12-11 19:07:40 -0800 (Fri, 11 Dec 2009)
    Log Message:
    When sub-components don't have a tabIndex and when VideoPlayer instance does, assigned tabIndex to each inner-component to ensure that they appear in the correct tab order with other components on the stage.
    QE notes: none
    Doc notes: none
    Bugs: n/a
    Reviewer: Gordon
    Tests run: checkintests
    Is noteworthy for integration: no
    Modified Paths:
        flex/sdk/trunk/frameworks/projects/spark/src/spark/accessibility/VideoPlayerAccImpl.as

    Michael,
    "Michael Caughey" <[email protected]> wrote in message news:413f0af6$1@mail...
    If I'm doing something wrong what is it? Obviously there is something
    different about how I configured my environment a year ago.What happens if you bring down ms02?
    Regards,
    Slava Imeshev

  • Creating GUI component that includes other components

    Hello, I need to create an UNIVERSAL FORM (panel) consisting of several textboxes and labels. These textboxes and labels will be defined in XML. I want it as a GUI JavaBean. It should be made from a panel with some layout and it should consist other components. Here are my questions:
    1) What class to derive from? JPanel?
    2) Well, when I override a GUI Swing component I must implement a paint method but this is a bit strange. I just want to set up the textboxes -- I do not need any special painting. A question appears -- is JavaBean technology good for this situation? Is there any better solution?

    I mean why this doesn`t work:
    public class Uniform extends JComponent implements
    Serializable {
         private String xmlContent;
         private int type;
         private JPanel panel;
         public Uniform() {
              panel = new JPanel(new GridLayout(1,2));
              panel.add(new JTextField("A"));
              panel.add(new JTextField("B"));
         public void paint(Graphics g) {
              panel.paint(g);
    }Is it a good solution? How would you solve the
    problem?
    Thanks for your ideas.If you mean by 'dont' work' that your text boxes and panel doesn't appear, then it's because you're missing this line in your constructor:
    public Uniform() {
      this.add (panel, BorderLayout.CENTER);
    }Regards,
    Devyn

  • Custom component composed of other components

    Hello.
    I have a form (long, but simple) that is reused a few times across my applicaition. It would be great if I could package it as a JSF component. But I see no obvious way to create an UIComponent composed of other UIComponents.
    Are UIComponents really meant to be written from scrach, each parsing it's own request parameters and outputting raw html? Am I missing something?
    Thanks.

    Thanks for the quick reply, but I'm still stuck...
    How do I go about writing a composite custom
    component? Instanciating all sub components and
    delegating encoding and decoding to each? That's the road I try to take first.
    - Construct a SMALL test-bed application to develop your component.
    - consider implementing the naming container interface if you add components as children
    - consider acquiring "JSF in Action" from Kito Mann, it's the book with most samples for component building
    - announce "absences" to your family. It takes longer than you think beforehand ;-)
    - If your servlet-container starts up in less than 10 seconds it's better...
    I'm afraid to be asking too much, but does anyone
    know where can I find an example of this? I'm
    currently browsinng the MyFaces code, but so far
    whithout much luck....Well the myfaces code is the second best source after JSF in action and then there are a few tutorials on the net... time to surf to google and http://www.jsftutorials.net/
    hope this helps
    Alexander

  • I have an airport extreme 2013.  Why does my airport utility sometimes display IP addresses and other times the names of the devices?  I want it to always display the device names.

    I have an airport extreme 2013. Why does my airport utility sometimes display IP addresses and other times the names of the devices? I want it to always display the device names.

    The utility has had less and less useful information .. it might be time to simply find a different utility.
    Fing network scanner. iphone and ipad.
    https://itunes.apple.com/au/app/fing-network-scanner/id430921107?mt=8
    This is very popular.. I do not know of what works well on Mac OS because i have installed 5.6 utility which of course has far more info than the later toy version. Plus using an Asus router which has excellent listing of all the clients.
    Sometimes beating yourself up to make apple routers do what you want is easier solved with lateral thinking.

  • Menus appearing underneath other components

    I am having a problem making my menus appear on top when they 'pop up'. I know this is a problem with mixing heavyweight and lightweight components, and I have been trying to force the menus to be heavyweight but to no avail.
    I have been trying to set the menus to be heavyweight by calling this method after the menu has been instantiated:
    [menuname].getPopupComponent().lightWeightPopupEnabled(false);
    Here is an image showing my problem:
    http://www.inf.brad.ac.uk/~jpcatter/menus.jpg
    Edited by: JonCat on Jul 26, 2008 8:47 AM

    It is not a mix of swing and awt. The browser component is the mozswing MozillaPanel component, and it is this that is being drawn on top of my menus, as can be seen from the screenshot that I posted. Another thought I had was that the browser component is the last to be drawn, as it is added to the tab control once all other components are drawn. Could it be the Z ordering of components causing the overlap, or is it strictly a heavy / light weight issue?
    Here is a link to the mozswing homepage for anyone who is interested:
    http://confluence.concord.org/display/MZSW/Home

  • Pages not always displaying properly

    Hi. For some reason certain websites I use often as well as various others aren't always displayed properly (e.g. they often have the menu at the top/side and no main content). Sometimes refreshing the page a number of times or hitting back helps and other times I end up going off the site and going back to it later where there's about a 50/50 chance it will load fully.
    I thought maybe it's because my Firefox browser needed updating, but after updating it I still have the same problem.
    I cleared my browsing history/cookies/cache and it did nothing. Then I noticed under Options-Advanced-Network it mentioned the cache for offline storage, which I noticed was at 1GB (it seems to go up very quickly). I cleared it and the sites all loaded first time until I closed the browser window and re-opened it. Now no matter how many times I clear the cache, cookies or anything else it still refuses to display the pages properly.
    On top of that I'm suddenly getting pop-ups for various sites (usually with a table of ebay or amazon items). They often appear when I click to type in a box on a site (e.g. in a search engine), but it happens randomly on any site and the window it opens always has a different address even if it is displaying a similar page. This too started when I still had the older version and is still continuing with the latest version. I have block-ups blocked.
    A few weeks ago everything was fine and I haven't added any extra add-ons or done anything different in that time (as in surfing the web, editing browser settings or downloading new programs, or even editing existing ones). However, today I did update existing add-ons just to see if this was the problem. This has all started in the last week or so.
    Any ideas as to what is causing these problems and how I can solve them?
    Thanks

    Thanks. Them links just suggest to do what I've already done though. I've cleared the cookies and cache and history. I've disabled extensions, themes and plugins to see if that affects it. I completely uninstalled FireFox and everything to do with it. I've done full system scans for viruses, malware and spyware and found nothing and I've even used CCleaner to make sure it wasn't a file affecting it that shouldn't be there. I've then re-installed firefox and I still have the same problem.
    I also noticed that when trying to load a page I get a small message in a box on the left hand side at the bottom of the browser that says "Read static.ak.fbcdn.net", but I've only noticed it on one site, not others that don't load properly.

  • Tree under Shared Components

    Can anybody show me step by step procedures how to create a Tree?
    I have root as :- Manual
    Second level(under Manual when user clicks on toggle sign '+') as :- Instruction, Launch, Package,etc many more
    Third Level(under Instruction when user click on toggle sign '+')as:- InstA, InstB, etc
    Third Level(under Launch when user click on toggle sign '+')as:- LanuchA, LaunchB, etc
    Third Level(under Package when user click on toggle sign '+')as:- PackA, PackB, etc
    how to implment it??
    Deep

    I am trying to build a tree as a navigation aid. There is no 'tree' selection in APEX under Shared Components > Navigation.
    Explained here.
    >
    So, I can not find any documentation on building a navigation tree in APEX 4.0
    Can someone tell me how to do this or where to look on the internet?
    >
    Chapter 8, Oracle® Application Express Application Builder User's Guide Release 4.0 ?
    The change to this jsTree component has not been altogether universally welcomed. A number of people have experienced difficulties with the transition from the previous implementation, or with their expectations of the features offered by the new one. Suggest you search the forum for more info. Won't comment myself as I've made no use of the "new" tree and only minimal use of the previous one.

  • Why is ATV output so much louder than my other components?

    I have the ATV connected through an AV Receiver along with other HDMI stuff (DVD player, etc.). When I select the ATV, the music is always much louder than any other components. Like it scares the heck out of everyone if we don't remember to change the volume first.
    I've played around with sound check stuff and had no luck.
    Any suggestions on how to level the noise by default?
    Thanks.

    This has always been a problem with ATV. The latest version 2.3 has music volume control, which helps, but it resets whenever you switch to a different media format (TV, Movies, Youtube, etc.). I am hoping that they will let you define a default volume for the ATV in the next version.
    Also, some users have reported different volume settings under different output formats (HDMI, digital, analog, etc.).
    Hope that helps (although I know it doesn't).

  • The PDF output is not always displayed!

    Hello
    I'm tryin' to build some PDF outputs and I have the next problem: I have 20 reports to make it on PDF form (viewed with the Acrobat plugin from IE 5.5 or higher) and when I try to see what was builded the PDF it's not always displayed ( mean it's not readed by the plugin). I generate the PDF output from a servlet (which also set the servlet output context as 'application/pdf') and, if the output it's generated too fast (meanning the report information was too small), the Acrobat plugin doesn't catch him ! I think that I have to slow down the servlet response to allow the plugin complete loading, but I don't khow how to do this (and, ofcourse, if it's possible).
    Please, I need a solution. !
    Thanx!

    Hi,
    setting content type as application/pdf is quite enough for the plugin to catch
    I generate the PDF output from a servlet
    (which also set the servlet output context as
    'application/pdf') and, if the output it's generated
    too fast (meanning the report information was too
    small), the Acrobat plugin doesn't catch him !but i think IE has a problem catching this, cause i also once ran thro this kind of problem
    I think that I have to slow down the servlet response to allow
    the plugin complete loading, but I don't khow how to
    do this (and, ofcourse, if it's possible). Yes it is possible.... if ur sevrvlet ehich is displaying pdf is http://host/PdfServert
    just make in such a way that the extention is pdf..
    http://host/PdfServert?xy=z.pdf or register the servlet with .pdf ext
    http://host/PdfServert.pdf...
    belive it really worked perfect for me..
    regards,
    Arun.N

  • I redownloaded my Photoshop CS5 and Camera Raw will not accept my RAW files nor will the Adobe Bridge display the picture view of these files. A message displays saying it doesn't support this camera.  I have a Nikon 5100 DSLR Camera.  It always displayed

    I redownloaded my Photoshop CS5 and Camera Raw will not accept my RAW files nor will the Adobe Bridge display the picture view of these files. A message displays saying it doesn't support this camera.  I have a Nikon 5100 DSLR Camera.  It always displayed them in the past.  How can I get it to display these photos in Bridge and open them in RAW?

    Adobe - Adobe Camera Raw and DNG Converter : For Windows : Camera Raw 6.7 Update
    Adobe - Adobe Camera Raw and DNG Converter : For Macintosh : Camera Raw 6.7 Update
    Benjamin

Maybe you are looking for

  • Is there a way to recover an overwritten image folder in a site root?

    I mistakenly did a 'get' of the 'images' folder in my remote site and it overwrote my local site file, which contained many new photoshopped jpgs that I had spent hours creating and had recently placed there for the site work. I am working in CS5 on

  • How to prepare  for interview

    hi everyone, Just know completed my sap sd course. i would like to know how prepare my self for interview..... i do have Configuration  skills in u2022     Sales Process: Expert in Quotation, Sales Order, Delivery, and Billing. u2022     Special Busi

  • HDMI Help

    Hey Everyone, First post here, so I apologize if I'm in the wrong section. I tried a Forum search and coudn't find what I was looking for, so here goes. I have the NF750-G55 motherboard, and I'm trying to send my video out through the HDMI port to my

  • Bex Broadcasting and trying broadcast email

    Hi Gurus, Iam Using Bex Broadcasting and trying broadcast email. but it is raising an Error.     -->Settings were started from the BEx Broadcaster      -->Processing for user SUMANB, language EN      Processing setting     -->The query was successful

  • Change IM Chat screen to Top to Bottom from Side t...

    I do not like the new UI! I prefer the older version. Specifically I have a problem with the chat window being forced to the side of the screen instead of from Top to Bottom like in the previous versions. If there is a way to change this I would like