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

Similar Messages

  • Adding Component above all other components

    My initial problem is to put the panel (which is created as a result of a click on a button) above all components that have been added to the GBLTablePanel. I've written the following sample that demonstrates my problem
    package test;
    import java.awt.Dimension;
    import java.awt.GridBagConstraints;
    import java.awt.GridBagLayout;
    import java.awt.event.ActionEvent;
    import javax.swing.AbstractAction;
    import javax.swing.JButton;
    import javax.swing.JFrame;
    import javax.swing.JLabel;
    import javax.swing.JPanel;
    import javax.swing.JScrollPane;
    import javax.swing.JTable;
    import javax.swing.WindowConstants;
    import javax.swing.table.DefaultTableModel;
    public class GBLTablePanel extends JPanel {
        private final GridBagLayout layout;
        private final GridBagConstraints gbc;
        public GBLTablePanel() {
         layout = new GridBagLayout();
         gbc = new GridBagConstraints();
         setLayout(layout);
         JTable table = new JTable();
         table.setModel(new DefaultTableModel(new Object[][] {
              { "aaaaaaaaaaaaaaa", 3, "a", null }, { "adasda", 10, "b", null },
              { "aaaaaaaaaaaaaaa", 3, "a", null }, { "adasda", 10, "b", null },
              { "aaaaaaaaaaaaaaa", 3, "a", null }, { "adasda", 10, "b", null },
              { "aaaaaaaaaaaaaaa", 3, "a", null }, { "adasda", 10, "b", null },
              { "assssss", 55, "c", null }, { "asdafasfa", 44, "d", null } },
              new String[] { "Title 1", "Title 2", "Title 3", "Title 4" }));
         JScrollPane scrollPane = new JScrollPane(table);
         gbc.gridx = 0;
         gbc.gridy = 0;
         gbc.fill = GridBagConstraints.BOTH;
         gbc.weightx = 1.0;
         gbc.weighty = 1.0;
         layout.setConstraints(scrollPane, gbc);
         add(scrollPane);
         JButton showPanelBtn = new JButton(new AbstractAction("Show panel") {
             @Override
             public void actionPerformed(ActionEvent e) {
              /* When this button is clicked I want that panel to appear on the top (above all components of the GBLTablePanel ) */
              JPanel panel = new JPanel();
              panel.add(new JLabel("This must be on the top of JTable"));
              panel.setSize(panel.getSize().width, 30);
              panel.setPreferredSize(new Dimension(panel.getPreferredSize().width, 30));
              layout.setConstraints(panel, gbc);
              gbc.gridy = 0;
              GBLTablePanel.this.add(panel, 0);
         gbc.gridwidth = GridBagConstraints.REMAINDER;
         gbc.gridy = 1;
         layout.setConstraints(scrollPane, gbc);
         add(showPanelBtn);
        public static void main(String[] args) {
         JFrame f = new JFrame("Test");
         f.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
         /* Construct table managed by GridBagLayout */
         GBLTablePanel panel = new GBLTablePanel();
         f.add(panel);
         f.pack();
         f.setVisible(true);
    }I hope the example is not too confusing, honestly I'm not sure what do I try next to fix my problem. The panel simply does not show up :(

    Here is an example that might help you with using GridBagLayout:
    package table;
    * TableInGridbaglayout.java
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class TableInGridbaglayout extends JFrame {
        private JButton btShowPanel;
        private JPanel panel;
        private JTable table;
        private boolean show;
        public TableInGridbaglayout() {
            super("TableInGridbaglayout");
            setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
            setSize(400, 300);
            setLocationRelativeTo(null);
            panel = new JPanel();
            table = new JTable(4, 4);
            btShowPanel = new JButton("Show Panel");
            panel.setBorder(BorderFactory.createTitledBorder("Panel on top of table"));
            panel.setVisible(false);
            getContentPane().setLayout(new GridBagLayout());
            GridBagConstraints gridBagConstraints;
            //panel:
            gridBagConstraints = new GridBagConstraints();
            gridBagConstraints.gridheight = 3;
            gridBagConstraints.fill = GridBagConstraints.BOTH;
            gridBagConstraints.weightx = 1.0;
            gridBagConstraints.weighty = 0.3;
            getContentPane().add(panel, gridBagConstraints);
            //table:
            gridBagConstraints = new GridBagConstraints();
            gridBagConstraints.gridx = 0;
            gridBagConstraints.gridy = 3;
            gridBagConstraints.fill = GridBagConstraints.BOTH;
            gridBagConstraints.weightx = 1.0;
            gridBagConstraints.weighty = 1.0;
            getContentPane().add(new JScrollPane(table), gridBagConstraints);
            //button:
            gridBagConstraints = new GridBagConstraints();
            gridBagConstraints.gridx = 0;
            gridBagConstraints.gridy = 4;
            gridBagConstraints.anchor = GridBagConstraints.SOUTH;
            gridBagConstraints.weightx = 1.0;
            gridBagConstraints.weighty = 0.1;
            getContentPane().add(btShowPanel, gridBagConstraints);
            btShowPanel.addActionListener(new ActionListener() {
                public void actionPerformed(final ActionEvent evt) {
                    show = !show;
                    btShowPanel.setText(show ? "Hide Panel" : "Show Panel");
                    panel.setVisible(show);
        public static void main(final String args[]) {
            EventQueue.invokeLater(new Runnable() {
                public void run() {
                    new TableInGridbaglayout().setVisible(true);
    }

  • I've installed CS6 and web Premium on a Mac running 10.9.5, and Dreamweaver,Flash and Illustrator wont launch.  All other components work normally.  In Activity monitor it says Adobe switchboard failed to respond.  Can anyone help solve this issue?

    I've installed CS6 and web Premium on a Mac running 10.9.5, and Dreamweaver,Flash and Illustrator wont launch.  All other components work normally.  In Activity monitor it says Adobe switchboard failed to respond.  Can anyone help solve this issue?

    Release: 4/25/2012
    http://support.amd.com/us/gpudownload/windows/Pages/radeonmob_win7-64.aspx

  • Can iChat be pinned above all other windows

    would like to keep iChat chats pinned to desktop and kept above all other windows. Hate having to look for the window when I have multiple other things going on and if someone wants me vs others in the chat the bouncing icon doesn't do it for me. Thanks for the help

    Raman,
    This does not sound like an xMII issue but rather your computing environment.
    -Sam

  • I bought new Macbook Pro 13" around two months before .My Apple ID is working on all other things except app store . It is buffering for a lot of time and lastly coming on screen " can not connect to app store " Please help me

    I bought new Macbook Pro 13" around two months before .My Apple ID is working on all other things except app store . It is buffering for a lot of time and lastly coming on screen " can not connect to app store " Please help me

    Have you tried repairing disk permissions : iTunes download error -45054

  • Ipod Touch 16gb wont connect to my wifi anymore. Others can connect to mine and my Ipod can connect to all other locations except mine. It used to with no problem. I have restarted my Mac, my router and Ipod many times and nothing works. Help

    Ipod Touch 16gb wont connect to my wifi anymore. Others can connect to mine and my Ipod can connect to all other locations except mine. It used to with no problem. I have restarted my Mac, my router and Ipod many times and nothing works. Help

    My paper work for my linksys says WEP 64 bits. I've tried changing my IPOD to that and it will say put in password and when I do I get "invalid password" or can not connect. This has been in the last few weeks. I have researched this for the last 2 weeks, called apple and they said it's not my IPOD, called Linksys and they want to charge $30 to fix it. How do I change my router without totaly not messing it up?

  • 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.).

  • Open in Tabs always replaces  all other open tabs ?

    This is unacceptable. Suppose I have 5 open tabs and then I pres Open in Tabs (this command is available on the Toolbar when I create collections)
    This will close down all the 5 open tabs and replace them with the tabs in the folder!! I want to keep my 5 tabs open aswell.
    Message was edited by: Bomiboll

    Yes, I use the internet extensively most days and just switched to Mac/Safari from Windows/Internet Explorer. I love Apple and the Mac. So much easier to use in many ways, especially when you learn shortcuts. On Windows/IE I could have 3-6 browsers open, each with their own tabs, and see in them in the task bar and easily choose them. I am having trouble with this kind of visibility while switching in Safari. One thing I do love is the tab collections. Excellent! I have one for the weather, with 2 tabs in it, and one for my investments, with 3 tabs. I would agree strongly that their needs to be an option to open these collections in tabs, where it added to the existing browser's tabs instead of replacing them. Also, another need: Allow me to see titles of my open browsers and when I hit Apple` (Command`) to switch browsers, I see the focus change to the other browser title, on the bottom of the screen like the tabs go across the top. Or have them pop up where the tabs are now, when Command` is hit. Then they switch back when you let go of Command`. For people like me who are on sometimes 10 browsers, each with 3-5 tabs, all day long, there needs to be much more visibility to what is open, and easy ways using both shortcuts and mouse to navigate all of the browsers and tabs and be able to see your browser titles with tab titles underneath. Like a sitemap or an outline with indents. It could me similar to when you hit Command-tab. I actually think Command tab should be expanded to include the browser windows, each one becoming an "application" along side of Word, Mail, iCal, Address Book, etc, all of which I have open all day. Then I can easily switch between my apps and browsers and have good visibility. Now I have to switch to Safari, then a second motion and process to switch to the correct browser out of 3-6, or even 10 browsers. So you could put them in the popup when Command - tab is hit. Then under each browser, show me an abbreviated title of the browser, and under it, show me abbreviated tab titles associated with that browser. Allow me in preferences to show or not show the tab titles. Expose is great but I would rather have the choice to do everything with Command - tab. For how much I use the internet, Command-tab keeps my hands on the keyboard and saves me so much time because I don't have to take my hands off the keyboard. Expose is great, but I loose time. Clicking on the Safari dock icon and holding is good too, but again my hands leave the keyboard, maybe 50 times a day and it costs me time and is inefficient. This whole thing I just wrote is a fabulous idea. It would be revolutionary if Apple did this. Apple - If you like this idea I have another one that is completely revolutionary and a whole new product/communication concept. I need to get a provisional patent on it first before sharing it. Anyway, I'm an ideas guy and commonly have great ideas and would like to know how I can do that with Apple on a consulting basis through my company, Kokopelli's Earth, Inc. www.kokopellisearth.com. Meanwhile, I'm just going to keep posting on these boards. Watch my posts. They may not be often, but when I say something, it will usually be a pretty good idea. Or at least start the thinking process on how to improve something greatly. At least I think so. I love what you are doing. I have changed over all of my stuff to Apple. 2 Mac Books in the house, 2 iPhones, Mobileme, Time Capsule, Apple TV, Airport. Love it all, works so well and easy, great support on the phone and fabulous in the store. Amazing stuff. Sorry to ramble but I just needed to say all of that. Hope this helps someone. Peace

  • Can we upgrade a WAS to basis700 while all other components stay 640?

    We  have this "strange" requirement for some reason. We never did upgarde on only one component.
    Could you tell whether this will not cause any problem?
    Thanks!

    The background is as follows:
    We want to upgrade a production VIRSA to GRC5.3.  Per note 1133173 "Upgrade to SAP BASIS 700 with VIRSANH 530_700",  seems only BASIS and ABA need to be upgraded to 700 for our VIRSA
    upgrade purpose.
    We want to minimize the change on the production, that's it.
    Your advices are very helpful.  Thanks!

  • XMII apllication window raises above all other windows

    >My xMII application refreshes every 30 seconds.
    >I have to open apllication such as Outlook express along with xMII apllication.As soon as xMII apllication refreshes it takes me to xMII application window from the already open Outlook express window.
    >Is this a browser property?
    >I want to avoid opening of xMII apllication as soon as it refreshes.
    >Can I use a function  "alwaysraised"  to avoid this situation?

    Raman,
    This does not sound like an xMII issue but rather your computing environment.
    -Sam

  • Pages works with all other docs, except the one I need to work on.  From my downloads folder I can preview the entire file, however whenever I try to open it, i get the "opening" pane filled to ~90% and then the SBBOD.  Only file it does this on...help??

    From my downloads folder it recognizes the file as a Pages document, I can preview the entire document, but I try to open the file in multiple ways (from right click, to open from preview, from inside pages) and it refuses to open.  The "opening" prompt comes up, fills ~90% and then I eventually get the SBBOD.  It will fail out if given long enough to think it through or i need to force quit.
    OS- 10.7.5
    Pages: downloaded from App store when i purchased my mac mini last fall. fresh update.

    Since it has always been very basic to backup your computer and all it's data, Apple provides no way for you to transfer music from your iPhone back to your computer.  As you know, you can re-download all iTunes purchases, but music that you ripped yourself you'll have to just re-rip again.
    You can try and find 3rd party applications that might help you.  I'm sure you'll pay, however.
    Let this be a very important lesson learned.
    Best.

  • I am unable to add hotmail account into my ipad 2.  Hotmail says the problem is with apple since I can access the account in all other devices except my ipad. I need to get pass, "unable to verify my account information"  Apple personnel appear helpless

    I have an Ipad2 and have tried severally to re-add my hotmail account but couldn't.  In collaboration with Apple personnel today (10/17/2012), we routed the Settings and General via the home page but solution appears elusive.  I can't get pass "Unable to verify your account information"  Hotmail feedback has it that the problem is with the iPad since I can access the hotmail account on my laptop, desktop, and smart phone,  Can someone please help me in this matter. 

    I see you have resolved this problem but for anyone else trying to sort out their Hotmail account on their iPad try the following:
    Try deleting your Hotmail account from your iPad/iPhone (making sure you can access your emails from your PC or other device as all your email history will also be deleted). Then under Settings go to 'Add an account' and click 'Other'(don't use the Hotmail heading). Fill in the required details for your Hotmail account and wait for account to be verified. This has just worked for me. Good luck!

  • Firefoox will not see my default network printer. it see's all other printers except that one. why not?

    firefox will not see my artisan 810 network printer and allow me to select it from the available printers. why not?
    == This happened ==
    Every time Firefox opened
    == un known

    Thank you. That's what I thought will need to happen.
    One more question. I tried using the Apple install disk that came with the computer. It's an OS 10.5.6 disk. It does not see my 10.6.8 system internal hard drive to repair. All it see's is itself 10.5.6 disk. Do you think I can use a 10.8+ disk utillity since that is a higher system it will see the 10.6.8. Where the 10.5.6 does not?
    I don't want to turn the computer off for fear I'll get the question mark again. P-Ram got me going last time but for how long I don't know?  It would be nice to be able to turn the computer off for the night and startup as usual to give it a rest and try to reset itself.
    Thanks for your help, I know I will eventually need to re-install. But I am in the middle of a project with tight deadlines and all I can do right now is back-up. Trying to migrate to another computer temporarily to finish the job. That's a lot of extra work in the short time also.
    Just trying to put a band-aid on it for another couple weeks.

  • Putting Components on top of other components

    Hi,
    I need some help with the following subject:
    from the super-class i need to place a component on top of all other components (or paint something on top of these), but when i add the component it shows below all other components.
    How can I make this work?

    sorry, but this was a little to essential.
    1. how does the paint method of the VXComponent look like?
    2. where and how do you add the other components, which are drawn on top of your component?
    3. actually you seem to use no LayoutManager?
    - I never did that but I'd guess it causes the container to draw the components just in the (reverse?) order in which they where added.
    if this is the case something like this should help:
    add(vx, 0),
    or
    add(vx, getComponentCount()-1);
    regards
    Spieler

  • 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

Maybe you are looking for

  • HT1414 how to reset my phone passcode?

    how can I reset the passcode to my iphone....

  • Exposing model nodes

    Hi i need some clarification regarding exposing the model node!! Can we expose the model nodes so that it could be mapped across different DCs. i tried using this concept but when I use this dc in another dc, it gives me error regarding wdContext etc

  • Including in expdp oracle 11g r2

    hi gurus, schema level backup including some objects in oracle 11g r2 ]$expdp scott/tiger dumpfile=schema.dmp logfile=schema.log schemas=scott directory=dpdump include=table:"in ('EMP', 'DEPT')" it is saying badly include parameter mentioned. is ther

  • Lightroom included in Creative Cloud? Timing?

    I'm asking a question that has been asked before, but with no response! WHEN is Lightroom going to be included in Creative Cloud. I am using a trial version of LR 4.1 and have only 7 days to go. I do NOT want to purchase LR and find that all of a sud

  • Resetting 4g wireless modem

    my Mac was connecting to the hotspot but was not accessing the internet so I tried a factory reset. Unfortunately I am stuck on step 2. After the tick box option of deactivating my registered modem and activating current modem (both the same really)