JLayeredPane and added Components

Hi everybody,
I have a panel for drawing, what is actually a JLayeredPane. With the add(someComponent, int layer) I am adding severals JPanel, on which I draw Rectangles for example.
Now I need to change the layer of a certain JPanel in the layeredPane. This is no Problem (with setLayer(...)). But I have one JPanel, its bound by a Rectangle and I added with the add-Method a own Object (it's a line). The line has to be an object, because I added a MouseListener to that line.
It appears like that:
|    (1)    |
|           |
|           |
|-----------|
|           |
|____________It's the line in the middle I'm talking about. So when I change the Layer of the JPanel (the Rectangle), the line has the correct bounds, but is displayed in the upper middle position in the Panel (no. (1) in the graphic).
I tried to remove and re-add it, but nothing helps. Does anybody know the problem?
Thanx for helping!!
Robert4

By default JLayeredPane uses null layout manager. So you have to set the bound of the component being added into JLayeredPane.

Similar Messages

  • Deleting and Adding components in a Sub contracting PO, for every line item

    Hi,
    I have requirement where in I need to change the Item category from Blank to 'L' for a given Line item, and for this Line Item I need to go to the Delivery Schedule lines and delete the existing Components and add new components to every Delivery Schedule line. This is going to be a LSMW object with a custom program.
    I tried for recording ME22N, but couldn't do this as ME22N  is not BDC friendly, and in ME22 the Item category field is Display only. I also tried with Function modules/BAPIs but nothing seems to be working out.
    Can anybody help me get a solution to this requirement. Would appreciate a quick response as its a priority requirement for me.
    Thanks in Advance,
    Saleem.
    Ph : +91-9845627631

    1. You will definitely create two subcontracting info records for two raw materials say RAW1 and RAW2.
    2. There will be two seperate production versions for these two materials.
    3. Update respective production versions in respective subcontracting info-records.
    4. This will help to upload the alternate BOM even you changed the material from PO
    Amol

  • IDOC for Creation of Production order and also adding components

    Hi ,
    I have a requirement like I get the data from a 3rd party system and using that i have to create production orders and also should be able to add more materials in COMPONENTS part of that Production order. I was looking for a BAPI which can handle this process.
    And also can any one help me by letting me know is there any Message type available for handling this process of Production order creation and Adding extyra components to it.
    I have a  message type LOIPRO (for Production Order) and associated function modle CLOI_MASTERIDOC_CREATE_LOIPRO for creation of master IDoc, but not sure can i handle the Components part in this.
    Please do send replies ASAP, its very urgent.
    Or else atleast suggest me the other ways of doing this .
    Also send me any BDC program if anyone has already developed for this.
    Thanks
    Kumar
    Edited by: Phani Kumar Peddagopu on Mar 19, 2008 6:56 PM

    Resolved .

  • Sales order cancelled and new sales order with added components

    Hi all,
    There is a MTO scenario.Lets say a product X was to be made .Now when the production was complete,the sales order got cancelled and a new sales order was generated for same product with 2 new components to be added,lets say A and B.
    So now i have to use the finished good x and new components A and B for the new sales order.How will the costing of new product be done and how do i maintain the BOM?

    Dear,
    You have to create the new material code for your new product as it is having two new components. For that new product say Y you need to add the X, A and B.
    As you have already manufactured the X so system will not create any procurement proposal for it and you can consume the X while manufacturing the Y and it cost also get capture to the Y. This is standard Practice.
    Hope clear to you.
    Regards,
    R.Brahmankar

  • Hi i added a few sofware products and hence components do we need to add ..

    hi i added a few sofware products and hence components do we need to add these
    to the technical and business system

    Yes add them. How ever, if you do not add them you will not get any error. But while editing the condition editor in Receiver agreement or Interface Determination, you will not get the source msg structure.
    So it is better to add them.
    Regards,
    Jai Shankar

  • [svn:fx-trunk] 12946: Fixed capitalization and added newline to components. properties

    Revision: 12946
    Revision: 12946
    Author:   [email protected]
    Date:     2009-12-14 22:00:07 -0800 (Mon, 14 Dec 2009)
    Log Message:
    Fixed capitalization and added newline to components.properties
    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/bundles/en_US/components.properties
        flex/sdk/trunk/frameworks/projects/spark/src/spark/accessibility/SpinnerAccImpl.as

    Thats good news.

  • Removing and adding panels to a jframe

    i have tried using remove all to remove a panel which is on my mainpanel which is on the jframe. when i do though, only the area where the menu was is removed. The components on the frame are not accessible. i want to then add another frame. this does not seem to work. i have tried using removeAll(), validate(), repaint(). i am probably not using them correctly or in the right order, so can anyone help me out?????????

    If you have added the JPanel to the JFrame and the components to the JPanel the removeAll() should work.
    public void actionPerformed(ActionEvent e){
       if(e.getSource()==myButton){
           content.removeAll();
           content.add(panel2);
      }

  • Can't import datePicker/dateDisplayer components into "Added Components"

    I downloaded the source code and the components lib and follow exactly the steps that mentioned in the documentation but i'm still not able to import the datePicker components lib,and when i click import componets the JSC prompt for the runtime jar file,and i dunno where to get that jar file.
    anyone please explain what i need to do???????

    Hi,
    I could add the datepicker complib. Here is what i did
    -- Go to palette -> standard
    --right  below added components ,choose import  component library
    --Select the complib file,click OK
    -- you can see Date Picker and Date displayer are added
    Hope this helps
    MJ

  • Panel adding Components

    Hi all,
    I have a problem here with Java swing. I tried to create a JPanel and add all the components in to it like Label, JRadioButton,JCheckBox, etc., and finally adding them in to a container which gets the content pane and display it. The problem here is the panel is adding the Label properly but not the other JComponents. I have tested it by adding some more JComponents and non-JComponents and those with nonJs are added properly and displays only those components.
    Model Code:
    Container cp = getContentPane();
    cp.setLayout(new FlowLayout());
    JPanel secPanel = new JPanel();
    secPanel.setLayout(new BoxLayout(secPanel,BoxLayout.Y_AXIS));
    Label lbl = new Label("Heading");
    secPanel.add(lbl);
    secPanel.add(new JCheckBox("Choice 1");
    secPanel.add(new JRadioButton("choice 2");
    cp.add(secPanel);Further, I have also tested by creating a new JApplet and same as above, I did the panel and added JComponents in to that and it seems to work fine there.
    Completely, bizarre for me!!!
    Can anybody shed their views you have here?
    Thanks,
    Shivaram.

    Sure. I now removed all the nonJComponents and pasted down the code
    import java.awt.*;
    import java.applet.*;
    import java.awt.event.*;
    import java.util.*;
    import javax.swing.*;
    public class TestSwingCheck02 extends JApplet implements ItemListener{
        String order;
        int numSections=0;
        String[] alpha = { "A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V",
                "W","X","Y","Z"};
                int score = 0; //default value
                int ansSetID = 0;
                boolean validParams = true;
                Vector panelVector;
                Vector choiceVector;
                Vector labelVector;
                Vector boxGroupVector;
                Vector correctAnswers;
                Vector sectionScores;
                Vector ansSets;
                String itemSelected=""; //for debugging
                String errorMessage="";
                boolean shuffle;
                Container mainPanel;
                /** Initialization method that will be called after the applet is loaded
                 *  into the browser.
                public void init() {
                    try {
                        javax.swing.SwingUtilities.invokeAndWait(new Runnable() {
                            public void run() {
                                createGUI();
                    } catch (Exception e) {
                        System.err.println("createGUI didn't successfully complete");
                private void createGUI() {
                    // TODO start asynchronous download of heavy resources
                    panelVector = new Vector();
                    choiceVector = new Vector();
                    labelVector = new Vector();
                    boxGroupVector = new Vector();
                    correctAnswers = new Vector();
                    sectionScores = new Vector();
                    shuffle = false;
                    mainPanel = getContentPane();
                    order = this.getParameter("order_type");
                    numSections = Integer.parseInt(this.getParameter("num_sections"));
                    if(order.equalsIgnoreCase("C")){
                        mainPanel.setLayout(new FlowLayout());
                    }else if(order.equalsIgnoreCase("R")){
                        mainPanel.setLayout(new FlowLayout());
                    }else{
                        errorMessage = "Order type '"+order+"' is not recognised. Please specify either 'R' for rowwise layout or 'C' for columnwise layout.";
                    if(!(order.equalsIgnoreCase("C") || order.equalsIgnoreCase("R"))){
                        validParams = false;
                        score = -99;
                    if(validParams){
                        for(int i=0; i<numSections; i++){
                            Box secPanel = new Box(BoxLayout.Y_AXIS);
                            String sectionPart = "sec"+alpha;
    String heading = this.getParameter(sectionPart+"_head");
    String secType = this.getParameter(sectionPart+"_type");
    int totalChoices = Integer.parseInt(this.getParameter(sectionPart+"_choicenum"));
    String choiceList = this.getParameter(sectionPart+"_choices");
    String correctAns = this.getParameter(sectionPart+"_correct");
    String sShuffle = this.getParameter(sectionPart+"_shuffle");
    String secScore = this.getParameter(sectionPart+"_score");
    ansSets = new Vector();
    boolean hasMultipleAnswers = false;
    if(ansSets.size()==0){
    if(this.getParameter("answer_set") != null){
    ansSets.add(this.getParameter("answer_set"));
    }else if(this.getParameter("answer_set1") != null){
    for(int q=1;q<=100;q++){
    if(this.getParameter("answer_set"+q) != null){
    ansSets.add(this.getParameter("answer_set"+q));
    }else{
    break;
    if(sShuffle != null){
    shuffle = Boolean.parseBoolean(sShuffle);
    if(correctAns != null){
    correctAnswers.add(correctAns);
    sectionScores.add(secScore);
    String[] choices = null;
    if(choiceList != null){
    if(!choiceList.equals("")){
    choices = this.splitChoiceList(choiceList);
    if(choices.length != totalChoices){
    errorMessage = "Choicenum value doesnot match with the total number of choices in "+sectionPart;
    if(order.equalsIgnoreCase("C")){
    }else if(order.equalsIgnoreCase("R")){
    if(secType.equalsIgnoreCase("chk")){
    hasMultipleAnswers = true;
    }else if(secType.equalsIgnoreCase("rdo")){
    Font fnt = new Font("Monospaced",Font.BOLD,14);
    JLabel lbl = new JLabel(heading);
    lbl.setFont(fnt);
    labelVector.add(lbl);
    secPanel.add((JLabel)labelVector.get(i));
    secPanel.add(new JLabel("Check label"));
    secPanel.add(new JRadioButton("Check1"));
    Vector tempChoice = new Vector();
    for(int j=0; j<choices.length; j++){
    if(hasMultipleAnswers) {
    tempChoice.add(new JCheckBox(choices[j]));
    }else{
    tempChoice.add(new JRadioButton(choices[j]));
    secPanel.add(new JRadioButton("Check2"));
    if(shuffle){
    Vector afterShuffle = this.shuffleChoices(tempChoice);
    for(int j=0; j<afterShuffle.size(); j++){
    if(hasMultipleAnswers){
    JCheckBox chkBox = (JCheckBox)afterShuffle.get(j);
    chkBox.setVisible(true);
    chkBox.setEnabled(true);
    chkBox.addItemListener(this);
    secPanel.add(chkBox);
    }else{
    JRadioButton rdoBtn = (JRadioButton)afterShuffle.get(j);
    rdoBtn.setVisible(true);
    rdoBtn.setEnabled(true);
    rdoBtn.addItemListener(this);
    secPanel.add(rdoBtn);
    choiceVector.add(tempChoice);
    }else{
    for(int j=0; j<tempChoice.size();j++){
    if(hasMultipleAnswers){
    JCheckBox chkBox = (JCheckBox)tempChoice.get(j);
    chkBox.setVisible(true);
    chkBox.setEnabled(true);
    chkBox.addItemListener(this);
    secPanel.add(chkBox);
    }else{
    JRadioButton rdoBtn = (JRadioButton)tempChoice.get(j);
    rdoBtn.setVisible(true);
    rdoBtn.setEnabled(true);
    rdoBtn.addItemListener(this);
    secPanel.add(rdoBtn);
    choiceVector.add(tempChoice);
    //secPanel.setVisible(true);
    secPanel.setBackground(Color.YELLOW);
    mainPanel.add(secPanel, BorderLayout.NORTH);
    mainPanel.setVisible(true);
    public void itemStateChanged(ItemEvent ie){
    public void paint(Graphics g){
    Thanks,
    Shivaram.

  • Targeting ALSB and WLI components

    Hello!
    I'm using ALINT 3.0 + ALDSP 3.2 platforms in my project. I would like, my domain, to contain three clusters: one for ALSB and WLI services (ALSB cluster), one for ALDSP services (ALDSP cluster) and one for J2EE components (J2EE cluster). When I create everything from wizard, then all components related to ALSB and ALDSP are targeted everywhere. So, I have the following questions:
    1. Is there any specification, which component should be targeted to ALSB cluster and which should be targeted to ALDSP cluster.
    2. Which component of ALSB is responsible for targeting ALSB services. I mean, I don't want my services to be accessible from each cluster, just from ALSB cluster.
    3. Most components, after creating domain from wizard, are targeted to AdminServer as well. Which components should really be targeted there? And which components can only be accessible from clusters.
    4. Is there a really quick method of targeting a big number of ALSB and WLI components? Doing it from admin console is terribly time consuming. Of course I can edit config.xml manually, but do you have any less risky tool?
    5. Is such a configuration supported and recommended by BEA/Oracle? I would like to avoid an effort related to configuring trust and security between domains so I prefer to do it all in one domain.

    1, 2, 3. Run the wizard separately for ALINT, ALDSP and ALSB. When you are creating/adding to a domain, you can select the option to target bits to specific places.
    4. If you want 'fast' edit config.xml. If you want 'less-risky', use the Admin Console. If you want something in between, you can write a utility using the MBean api. (you can explore the MBean api using wlst). If you want Oracle/BEA to write it for you, open a Customer Support Case/Enhancement request.
    5. I don't see why it wouldn't work.

  • Version Control of APEX Pages and Shared Components

    Background:
    My organisation has a large customer base and over the last 2 years we have migrating from a forms to an apex user presentation layer. We have had a number of customers live on the apex front end for close to a year now.
    Our current method of releasing apex objects is at the application level (ie applications are exported for version control in PVCS and then released to Test etc). We now want to investigate exporting pages and shared components individually. Hence, I have a few questions:
    1. If I export a page and this is checked into PVCS and I forget to export a 'List of Values' shared component. What happens when the page in PVCS is created in another environment (ie Test). I guess the ‘Page Import’ would still succeed but the reference to the ‘List of Values’ would be some large made up number.
    How would we detect the missing dependency after import ?
    2. Regarding New or Changed Templates. Once again, if a page references a new template and is then exported, checked into PVCS and imported into test but the template is missed for migration to test, would the import succeed but the template reference would be broken, like in number 1.
    3. How can Application level objects be locked (reserved) when undergoing modification.
    Any comments would be appreciated especially if there are any sites using pages and shared component exports for version control and releases.
    For anyone who's interested, the method we are thinking of using is:
    ..Page Export script will be version controlled
    ..ALL the shared component export scripts will be added to 1 main SQL script
    Hence we only end up with 2 configurable objects in PVCS.

    Nigel,
    1. If I export a page and this is checked into PVCS and I forget to export a 'List of Values' shared component. What happens when the page in PVCS is created in another environment (ie Test). I guess the ‘Page Import’ would still succeed but the reference to the ‘List of Values’ would be some large made up number.
    For component export/import, the source and target worskpace ID and application ID must be identical. You can achieve the workspace "sameness" by exporting and importing the workspace from one database to another, thus preserving the workspace's numeric ID, aka security group ID. Similarly applications must be exported/imported/installed without changing their IDs in the installed-into instance. More fundamentally, the application you import/install components into must be an identical copy of the source application with respect to the internal object IDs, allowing only for differences that incent you to migrate changes from a higher rev level of the application into a copy that is at a lower rev level.
    As to the specific question, if you copied a page but didn't copy an LOV into the target application then if the LOV referenced by the page already existed in the target application then page would simply reference the existing, perhaps down-level, LOV in the application. If the LOV did not already exist but had been newly created in the source application, then the target application page would contain an invalid reference and would produce a runtime error.
    How would we detect the missing dependency after import ?
    I don't know of any reports that would tell you this. There are several types of omissions that you need to watch out for, not all of which can be detected by inspection of the target application in isolation.
    2. Regarding New or Changed Templates. Once again, if a page references a new template and is then exported, checked into PVCS and imported into test but the template is missed for migration to test, would the import succeed but the template reference would be broken, like in number 1.
    Yes, same case.
    3. How can Application level objects be locked (reserved) when undergoing modification.
    There is no provision for this as there is for pages.
    For anyone who's interested, the method we are thinking of using is:
    ..Page Export script will be version controlled
    ..ALL the shared component export scripts will be added to 1 main SQL script
    Hence we only end up with 2 configurable objects in PVCS.
    So you propose to have one script of all pages and another script for everything else? I'm not sure I got that right.
    Scott

  • There is a difference between the document total and its components

    Hi!
    I have an error message "There is a difference between the document total and its components" when I want to create an InventoryGenEntry
    the problem arises from time to time and my customer must do the document two or three times before it is created.
    I have seen in this forum and in notes that this is probably being caused by a Rounding.
    I am using 2 digits for amounts, 4 digits for prices, 6 digits for rates and 3 digits for quantities.
    For information my customer use SAP 2005 and the patch level 46.
    This problem happened only in InventoryGenEntry. how can I modifiy parameters to resolve this problem?
    thank you for your help.
    Best Regards
    Séverine

    Hi Séverine,
    Do you find any additional code added to SBO_SP_Transaction stored procedure. A similar issue with stock transfer fixed in later patch. Please test in latest patch.
    Regards,
    Vijay kumar
    SAP Business One Forums Team

  • Prevent adding components

    Hi All,
    How to prevent adding components while goods issue in a maintenance order.
    Thanks in advance
    Surya

    Hi Gurus
    Still trying to explore on it.
    What is the consequence if I uncheck the box UNPLANNED GOODS ISSUE in the IMG activity for Define Documentation for Goods movements for the Order?
    Path: SPRO>PMCS>Maintenance and Service processing>Maintenance and Service Orders>Functions and settings for Order types>Goods movements for order>Define Documentation for Goods movements for the orders.
    Thanks in advance
    Surya

  • Cannot send or receive yahoo mail or gmail from iPhone . installed ios 6 recently. tried rebooting the phone and deleting the email account and adding again but nothing works ! can someone suggest a solution?

    cannot send or receive yahoo mail or gmail from iPhone . installed ios 6 recently. tried rebooting the phone and deleting the email account and adding again but nothing works ! can someone suggest a solution?

    Not sure about yahoo, but for gmail, I done the following:
    Set up using Exchange on iPhone, it'll keep prompting for password.  On PC use captcha option, log in to gmail account from PC after completingg captcha option, enter password on iPhone.
    See how that goes for gmail, let us know.
    Hopefully someone will have fix for yahoo.

  • Voicemail not working - after removing and adding Dialplan

    Exchange 2013
    Lync 2013
    I had a UM dial plan configured and it was working properly.   I removed that plan and added a new one.  The new one does not work.
    When ever you leave a Voice-mail for a user, they never get it.  If the user logs in, they still have access to old voice-mails that were left before the UM dial plan was deleted and a new one created.
    My assumption is that when you activate the user for UM, it is attaching back to the existing information, instead of using the new dial plan.  Anyone have any thoughts on how to stop this?   
    Is there a way I can just purge all UM information and start over?
    Thanks,
    Rogan

    I did, as far as I can tell the new dial plan is working.
    Currently, only I am enabled for UM in the environment.  If you call my extension, you are able to leave a VM.  I never get a missed call notification or the Voicemail.  If I manually log into my Voicemail, I have no new voicemail and only
    old ones that were left before this new UM plan was created.
    I did remove UM from my account and re-add it with the new one, that did not solve the problem.  
    Where are the VM that are being left now going, if not into my mailbox.
    Does deleting a UM remove any associated voicemails?  Should it?
    Do you know if there is a way for me to reset my mailbox, to fully remove the UM capabilities and then start over?

Maybe you are looking for

  • Display a day of outlook calendar on ipphone

    Hi, I'm loking to display the calendar of a conference room on an ipphone. Does Somebody know how to do that ? Thanks !

  • Print Comments Option Missing in Adobe Reader 9.4.0

    Using a PDF I downloaded online, I inserted comments using both Adobe Acrobat Pro and Nuance PDF Converter Pro. In both the Acrobat and Nuance applications I can print the PDF with the comments just fine. When I opened the document in Adobe Reader 9.

  • Persisting Data across different WebApps/Sessions

    Hello all, I am developing in an environment where multiple (web & enterprise) applications are developed and deployed separately to the same clustered WebLogic infrastructure. The applications are all owned by the same company, and usually co-exist

  • WD-ABAP CHIP with BPM 7.30 - how to close the task?

    Hi all, after quite a while struggling (also due to the poor documentation) with CHIPS and Plugs and ... the first part works, I get the parameters from BPM into the WD-A. But I have not yet found a way to tell the iView that my work is done. The sta

  • Trouble opening e-mail video attachments

    As with most Macs, my MacBook Pro came with trial versions of Windows and iWorks. I decided to go with Windows. The trial period has long been over, and clearly my computer is set to some sort of default because when I attempt to open an attachment (