Adding a panel over other components in the main mxml application

Hi,
I've created a main mxml file that contains,among other things, a button, and another mxml that contains a panel with some options. I want to be able to add that panel to the main mxml OVER all other components in the main mxml file with a mouse click on the button in that main mxml. How can this be done, please help ?

Hi mesanarapscallion,
Can you please post the sample code you are working...
Do you want to show the panel component on all the thing above in the main.mxml file...Do you have all the other things positioned at the same position..?
Thanks,
Bhasker Chari

Similar Messages

  • [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

  • 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

  • Trying to move my iTunes Music and other media from the main drive on my pc to an external hard drive but iTunes is not recognizing the new file location?  Ideas?

    Trying to move my iTunes Music and other media from the main drive on my pc to an external hard drive but iTunes is not recognizing the new file location?  Ideas?

    Hello there, Underwriter.
    The following Knowledge Base article provides in-depth instructions on how to migrate your content to an external drive:
    iTunes: How to move your music to a new computer
    http://support.apple.com/kb/ht4527
    Particularly of note for your situation:
    External drive
    This option requires more work than Home Sharing, but it creates a backup of your iTunes library on the external drive in addition to moving your content.
    Notes before you start:
    You can use most iPods as an external drive.
    Windows operating systems don't recognize Mac OS-formatted disks (HFS or HFS Plus formats). Because of this, you can't use a Mac-formatted iPod or external drive to move your music to a Windows PC. See iPod: How to determine iPod's hard disk format if you're not sure how your iPod is formatted.
    Mac OS X can read Windows-formatted iPods and drives. This means there are many ways to migrate your information from your old Windows-based PC to your new Mac.
    Mac OS X: To be sure external drives appear on your desktop, choose Preferences from the Finder menu. Be sure the options for "External disks" and "Hard disks" are enabled.
    Part 1: Locating and consolidating the iTunes Media folder
    Part 2: Copy iTunes folder from the old computer:
    Part 3: Get iTunes ready on your new computer
    Part 4: Back up any music that's already on your new computer
    Part 5: Copy music to your new computer
    Part 6: Add preexisting music that was on the new computer back into the library
    Thanks for reaching out to Apple Support Communities.
    Cheers,
    Pedro.

  • Calling a component from a the main.mxml file

    How do I call a component from a the main.mxml file?
    <mx:Button id="btnNew" label="Launch Component " click="getComponent()" />
    main.mxml (Has the button, that I would like to launch getcomponent.mxml)
    getcomponent.mxml (The file I would like to call) (This file also has the ViewStack)
    For some reasoning it's not seeing the bpVS(view stack id). I'm getting Access of undefined property bpVS error.
    <!-- Main.mxml  -->
    <mx:VBox xmlns:mx="http://www.adobe.com/2006/mxml"
    xmlns:components="components.*"
    width="100%"
    height="100%"
    minHeight="0"
    backgroundAlpha="0">
    <mx:Script>
      <![CDATA[                    
       private function getComponent():void{
        bpVS.selectedIndex = 1;
      ]]>
    </mx:Script>
    <!-- GetComponent.mxml -->
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
    layout="absolute"
    xmlns:view="components.view.*">
    <mx:ViewStack  id="bpVS"
      top="69" left="180.5"
      width="100%" height="100%"
      resizeEffect="Resize"
      moveEffect="Move" showEffect="Fade"
      hideEffect="Fade">
    </mx:ViewStack>
    <mx:VBox id="vbTB" top="69" verticalGap="0">
    <mx:ToggleButtonBar
        id="payTB"
        direction="vertical"
        dataProvider="{bpVS}"
        width="180" useHandCursor="true" buttonMode="true""
        resizeEffect="Resize"
        moveEffect="Move" showEffect="Fade" hideEffect="Fade" >
      </mx:ToggleButtonBar>
        </mx:VBox>
    Thank you

    It won't see it just by creating the namespace that contains it.  There has to actually be an instance of it in the application.  So in your case, your main application file (lets call it MyApp.mxml) would look something like this:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
         xmlns:components="components.*">
         <components:Main id="main"/>
         <components:GetComponent id="getComp"/>
    </mx:Application>
    Then, you can reach down (mind you this isn't best practice) into those components to access their public properties.  In a script block in MyApp.mxml, you could access the VBox with getComp.vbTB.
    I don't know the ins and outs of your application, but perhaps Main is the main application, so then you would add GetComponent as a child of it instead of both Main and GetComponent being child components of the MyApp application.  Does that clear up the confusion?

  • 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);
    }

  • Passing a variable from an mxml component to the main mxml file

    Hey guys,
    I have a popup titlewindowt which is defined as a component in a separate mxml component file.
    In the popup window i have an inputbox and a button
    When i press the button in that popup window i want the text in the input box to be transfered across to a variable in my main mxml file
    How can i do this?
    Thanks
    Chris

    Since you are already tied in to the top level application then I would add a listener at the application level and in the component do a:
      FlexGlobals.topLevelApplication.dispatchEvent(....)
    However, I can't help but encourage you to decouple this functionality and pass events around rather than what you are currently doing.
    There are a few ways you can do this.  One is to use an MVC framework to model your application after.
    A simpler approach even would be to have the component simploy dispatch events to itself and have whatever is creating the component listen for the events and do higher level functionality.
    Good Luck!

  • How to pop up another VI front panel and run this in the main VI?

    Hi all,
    I want to create a VI, which contain several buttons: like "RUN ANALYSIS 1" and "RUN ANALYSIS 2".
    When I click one of them, another front panel of VI jump out and run automatically. When I click on "Finish" button on this VI (the one jump out), this front panel close.
    How to complete it?
    Thanks,

    Hi Osso,
    The ability to click on other VIs is also controlled by the Window Appearance. If you follow Dennis' instructions above, but this time change the Window Behavior to modal.  You can find more information about the different selections in the LabVIEW Help: Customize Window Appearance Dialog Box.
    Regards,
    Elizabeth K. 
    National Instruments | Applications Engineer | www.ni.com/support 

  • Cost of goods sold entry in PGI based on components of the main material.

    Hi  friends,
    Suppose material A is assembled using components B, C & D, during PGI of material A is it possible to generate an accounting entry at the component level. i.e accounting entry with debit entries of the cost of B,C & D
    Please advise.
    Regards,
    Udaynath.

    Dear,
    You can create a Sales BOM, and price it at ITEM level.
    If you want to assemble the products and depending upon the assemblies you want to price.   For eg. if the customer asks for a certain combinationa of Material A, B and C respectively, then you create a Material Master record Material D with item category group as LUMF.  While the Materials A, B and C are created with standared item category groups NORM only. 
    Then create a sales BOM using Tcode CS01 and enter the following details: 
    Material : Material D 
    Plant : Plant in which you created the material. 
    BOM Usage : 5 (Sales and Distribution) 
    then give the Materials A, B, and C and give their respective quantities. 
    Before you have to create pricing condition records for Materials A, B, and C. 
    Then configure the item categories ( T - code : VOV4). 
    When processing the sales order, just give the Material D and the system will pick up the corresponding assemblies for that material and populate in the order. 
    The item category for the header item will be TAP and the item cateory for the items will be TAN.
    In this cas the Material D is called as the higher level Item , and all the assemblies are called as the sub items.  Here the subitems are relevant for pricing and delivery where as the header item is not relevant for neither pricing nor delivery. It just acts as a text item. 
    Regards
    AJIT K SINGH

  • What is the main differencebetween "Application Items" and "Page0 items"

    ... i do not see the real difference...
    App items can be assigned on new session...so are assigmenet place only difference or I'm missing missing something bigger ... ?
    Could anyone tell me what?
    THX!

    Hello,
    As I see it –
    All page 0 items, including the hidden ones, will be rendered, by default, on every page. That will allow you to access them using JavaScript and DOM.
    Application items will always be there for you, but on the level of the ApEx engine. They will not be rendered on the page, so you can't access them using JavaScript.
    Regards,
    Arie.

  • Adding dynamic panels

    My application needs to dynamically decide how many components will be present in the panel depending on the clauses. For each clause, I have designed a seperate panel,(its design is fixed) . But the number of clause panels to be included in the main panel is dynamic. How do I add the panels to the main panel for display?
    I was successful in adding a single panel to the main panel. For this I had to define the layout of the panel again and set its horizontal and vertical group. But how do I add a list of components. If I add a for loop within the layout.setHorizontalGroup() or layout.setVerticalGroup(), it does not work. Also panel.addLayoutComponent() did not work. Can anyone please tell me how will I add the components dynamically.

    Its still not working.
    In my application I have some user defined panels. The component I need to add to the main panel is a user defined panel.
    The code is as follows, where panelBetween is a user-defined panel in the package com.HelperTool
    com.HelperTools.panelBetween between1 = new com.HelperTools.panelBetween();
                between1.jCheckBoxBetweenCondition.setText("Where userid between");
                jPanelMain.add(between1);
                jPanelMain.revalidate();
                jPanelMain.repaint();

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

  • Adding a panel to an open GUI with a background image

    Dear java programmers,
    I want to add a JPanel with some components on an open(visible) GUI whenever a button is clicked. That JPanel carries a button, a progress bar, a label, and a textarea inside a scrollpane. Whenever the button of the panel is clicked a program starts working, and the progress and output of that program is reflected on the progress bar and textfield respectively. I 'put the code to generate and add the panel in a so called "Progress" class, which is different from the GUI class that contains the code to create and display the main gui.
    My gui also has a background image to make is look fancy, which is added by the following way:
    GUI mygui = new GUI();
    mygui.getContentPane().add(new ImagePanel(new ImageIcon("/home/thomas/Documents/external_placement/Report/presentation4_transp.png").getImage()));
    My problem is that the background image is hiding the panel (whenever added) and only when the cursor passes above the button inside the panel it becomes visible (just the button). However when I click the button and the program starts I can see everything inside the panel.
    Is there an efficient way of making the panel visible at once?
    thanks in advance,
    Tom

    Ok now that I'm certain about how to use code tags I'll try to make myself clear.
    First of all I made it work by removing the ImagePanel , adding the JPanel and re-adding ImagePanel, all from within the Progress.class. But I'm not sure if this is the right way.
    Below I'll make an attempt to provide some SSCCE--code. First of all the classes I'm using are 2, the GUI.class which contains all the components of the gui, and the Progress.class which has the additional panel and adds it to the gui whenever the "submit" button is clicked.
    The code from GUI.class which is relevant to this question is:
    public class GUI extends javax.swing.JFrame{
    //the following are declared as "protected" because they are also used elsewhere
                protected static GUI mygui = new GUI();
                protected static ImagePanel backgroundImagePanel = new ImagePanel(new ImageIcon("/home/thomas/Documents/external_placement/Report/presentation4_transp.png").getImage());
                /* The constructor */
                public GUI() {
            initComponents(); //this method initializes all the components, puts the in a JTabbedPane and packs them the JFrame
            setLayout(new BorderLayout());
        /* the eventlistener of the "submit" button */
        private void submitButtonActionPerformed(java.awt.event.ActionEvent evt) {
            ProgressBarTest pbt = new ProgressBarTest(mygui);
            pbt.StartProgress();
        public static void main(String args[]) {
            java.awt.EventQueue.invokeLater(new Runnable() {
                public void run() {
                    mygui.getContentPane().add(backgroundImagePanel);
                    mygui.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
                    mygui.pack();
                    mygui.setVisible(true);
    } And then I have my Progress.class:
    public class Progress implements ActionListener, Runnable {
    //the following are declared as "private" because they are also used elsewhere inside the class
        private static javax.swing.JProgressBar progressBar = new JProgressBar(0, 100);
        private static javax.swing.JTextArea progressTextArea = new javax.swing.JTextArea(5,20);
        private static ProgressBarTest _this;
        {color:#0000ff}private static GUI mygui;{color}
        /* the constructor */
        public Progress(GUI gui){
            _this = this;
            {color:#0000ff}mygui = gui;{color}
        private static void createAndShowPanel(){
            javax.swing.JScrollPane progressScrollPane = new JScrollPane(progressTextArea);
            javax.swing.JLabel progressLabel = new JLabel("Progress");
            javax.swing.JButton progressButton = new JButton("Do something");
            progressButton.addActionListener(_this);
            javax.swing.JPanel progressPanel = new JPanel();
            javax.swing.GroupLayout progressPanelLayout = new javax.swing.GroupLayout(progressPanel);
            progressPanel.setLayout(progressPanelLayout);
            progressPanelLayout.setAutoCreateGaps(true);
            progressPanelLayout.setAutoCreateContainerGaps(true);
            progressPanelLayout.setHorizontalGroup(
                    progressPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(progressPanelLayout.createSequentialGroup()
                    .addContainerGap()
                    .addGroup(progressPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(progressScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 872, Short.MAX_VALUE)
                    .addComponent(progressBar, javax.swing.GroupLayout.DEFAULT_SIZE, 872, Short.MAX_VALUE)
                    .addComponent(progressLabel)
                    .addComponent(progressButton, javax.swing.GroupLayout.Alignment.TRAILING))
                    .addContainerGap())
            progressPanelLayout.setVerticalGroup(
                    progressPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, progressPanelLayout.createSequentialGroup()
                    .addContainerGap(25, Short.MAX_VALUE)
                    .addComponent(progressButton)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(progressLabel)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(progressBar, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGap(19, 19, 19)
                    .addComponent(progressScrollPane, javax.swing.GroupLayout.PREFERRED_SIZE, 161, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addContainerGap())
            javax.swing.GroupLayout layout = new javax.swing.GroupLayout({color:#0000ff}mygui.getContentPane(){color});
            {color:#0000ff}mygui.getContentPane().setLayout(layout);{color}
            layout.setHorizontalGroup(
                    layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                    .addContainerGap()
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(progressPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent{color:#0000ff}(mygui.jTabbedPane1{color}, javax.swing.GroupLayout.PREFERRED_SIZE, 496, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addContainerGap(100, Short.MAX_VALUE))
            layout.setVerticalGroup(
                    layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                    .addContainerGap()
                    .addComponent({color:#0000ff}mygui.jTabbedPane1{color}, javax.swing.GroupLayout.PREFERRED_SIZE, 362, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(progressPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addContainerGap())
           {color:#0000ff} mygui.getContentPane().remove(mygui.backgroundImagePanel);
            mygui.getContentPane().add(progressPanel, BorderLayout.SOUTH);
            mygui.getContentPane().add(mygui.backgroundImagePanel);
            mygui.pack();{color}
        public static void StartProgress(){
            ProgressBarTest t = new ProgressBarTest({color:#0000ff}mygui{color});
            new Thread(t).start();
            javax.swing.SwingUtilities.invokeLater(new Runnable() {
                public void run() {
                    createAndShowPanel();
        public void actionPerformed(ActionEvent ae){
    // signal the worker thread to get crackin
            synchronized(this){notifyAll();}
    // worker thread
        public void run(){
            while(true){
    // wait for the signal from the GUI
                try{synchronized(this){wait();}} catch (InterruptedException e){}
                Dock dock = new Dock();
                int chainArrayLength = dock.PrepareDockEnvironment();
    // start a long-running process -this is a task performed by "Dock.class"
                for (int i = 0; i <= 100; i++){
                    progressBar.setValue(i*100/chainArrayLength);
                    progressTextArea.append("Docking chain No "i".\n");
                    System.out.println("actionPerformed sets progressBar value to: "+i);
                    dock.StartDocking(i);
    }Please notice how I use the GUI object (named "mygui") inside the Progress.class to retrieve components from the main gui (particularly the jTabbedPane1), align them with the additional panel (progressPanel) and add them to the main gui again. I tried to color blue the lines where the GUI instance is used but I'm not sure if they will be visible.
    My questions are:
    1. Is this the right way to add a new panel to a jFrame from an external class? Do I add jTabedPane twice in the above code?
    2. Is this the most efficient way of making the additional panel visible at once, meaning by removing the ImagePanel (backgroundImagePanel) adding the panel (progressPanel) and finally adding again the ImagePanel (backgroundImagePanel)?
    Hope I was perspicuous.
    Tom

  • Printing problem - Words over other words

    Hello, I created a report and when hit the print icon in the Crystal Viewer it prints the report, but some words are over other words.
    The first time that I hit on the print button IE installed the ActiveX component (since I need to print in client-side, I put ActiveX option in the crystal reports viewer).
    I tried printing in my printer and in a PDF printer and I get the same issue on both.
    I tested it printing by code using the PrintToPrinter method and the report is printed fine. But I can''t use that because it just print in the Server printer, right?
    I am using the last version of CR with VS2010 in Windows 7 64 bits.
    Could you please help me with this issue?
    Best regards,

    The reason it prints in "Debug mode with VS". is that when you do this, you are essentially running a win app, not a web app. I'd recommend using code as described in the below KBase to find out if the worker process has access to the printer you are trying to use.
    [1418378  - How to determine what printers are available to a process in Visual Studio .NET|http://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes_boj/sdn_oss_boj_bi/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/scn_bosap/notes%7B6163636573733d36393736354636443646363436353344333933393338323636393736354637333631373036453646373436353733354636453735364436323635373233443330333033303331333433313338333333373338%7D.do]
    - Ludek

  • How do i get the components when a new window opens from the main window?

    In a given application, i am able to get the list of components for the main window. When an event happens in the main window, now a new window opens here how do i get the components for this newly opened window?

    getContentPane().getComponents() can be used, only if i know that new class name thats been poped up when the event happens to that main window....
    Is there anyway in runtime to know that new class name & fetch the event...

Maybe you are looking for