Refreshing the panels when new content added?

Hey, guys. My first post here; hope I'm not too much of a JNewbie for you. :)
I'm getting my feet wet in Swing, working on an invoice program for work. I want it to look like a regular invoice, with fields for SKU, description, cost per unit, units, and total per line item. Right now, I have those five fields in a Jpanel that I add to the bottom of the layout.
The problem is that I need the ability to go to File => Add New Item... and have another JPanel with those five fields add to the bottom so a 2nd item can be added to the form below the first. I tried making a function that adds them to the panel, using the same type of syntax that the generated code (using a form builder in NetBeans) did. I don't see the lines get added.
My thought is that there is some function I need to call to redraw or refresh the panel so that the new components start drawing. However, my Great Javadoc Adventure has turned up no clues.
Can anyone please give me a hand with making this happen, or at the least coming up with an alternate solution that will achieve similar results?
Thanks much.
Jaeden Stormes
[email protected]

I tried revalidate() , but no change.
Here's the function I'm using to try to add the item...
private void NewLineItem()
javax.swing.JPanel jLine = new javax.swing.JPanel();
jLine.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());
jItemCode.setHorizontalAlignment(javax.swing.JTextField.CENTER);
jLine.add(jItemCode, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, 110, -1));
jCourseDelivery.setHorizontalAlignment(javax.swing.JTextField.LEFT);
jLine.add(jCourseDelivery, new org.netbeans.lib.awtextra.AbsoluteConstraints(110, 0, 240, -1));
jItemQuantity.setHorizontalAlignment(javax.swing.JTextField.CENTER);
jLine.add(jItemQuantity, new org.netbeans.lib.awtextra.AbsoluteConstraints(350, 0, 110, -1));
jItemRate.setHorizontalAlignment(javax.swing.JTextField.CENTER);
jLine.add(jItemRate, new org.netbeans.lib.awtextra.AbsoluteConstraints(460, 0, 100, -1));
jItemAmount.setHorizontalAlignment(javax.swing.JTextField.CENTER);
jLine.add(jItemAmount, new org.netbeans.lib.awtextra.AbsoluteConstraints(560, 0, 100, -1));
jLineItemSection.add(jLine);
jLineItemSection.revalidate();
pack();
JLineItemSection is a JPanel inside my frame.
Any suggestions? I think the way I am using the AbsoluteContraints is screwed up, as I'm having a lot of trouble with the layouts in general. The form editor in NetBeans (at least, the version in 3.6) needs a LOT of work.

Similar Messages

  • Libraries dont update when new content added

    I have transferred my media files to the shared user folder so that multiple accounts on my imac can have access to them. When I did this the original connected library was fine but the other users libraries showed none of the content. So I proceeded to "add to library" in the other account and it added the whole content as expected. The problem is now if I add additional content to the files then I seem to need to go into each other accounts library and add to library. The original library is automatic but the other libraries don't update automatically. How do I get the other libraries on the other accounts to also update automatically when new content is added?
    thanks

    You have posted on the iTunes for Windows forum, you might do better on the mac forum.
    iTunes does not do folder watching, so only the library you used to add the content will be updated.
    There are 3rd party utilities that an deal with this, but I don't have a list for Macs. For Windows there is iTunes Library updater and iTunes folder watch.
    TuneRanger would probably do it, but it is not free and may be a bit more than you need.
    http://www.acertant.com/web/tuneranger/

  • How to refresh the panel's display in listener?

    I have a Jcombobox and a panel(square,background color:white). I want user to choose the panel's size from the combobox and thus change the panel's display. However, when I choose a value from combobox, the panel's size DOES change, but the display cannot be rerfreshed realtimely. It still display the panel by previous size. If I minimize the whole window and restore, then the panel gets refreshed, displaying by new size.
    Can anybody tell me how to refresh the panel's display dynamically? thank you a lot.
    sraiper

    if we bounce the listener the connections to other might be lost.NO!
    The listener contacts the DB to establish the initial connection between client & DB.
    After the connection between DB & client has started, the listener has NO involvement between DB & client.
    Stopping the listener has NO impact on existing sessions.
    Edited by: sb92075 on Jul 28, 2009 4:37 PM

  • How to Refresh The Page When The Value of selectinputData Changes

    Hi;
    I have a select input date component and I want to refresh the page when the value of selectinputdate changes. What is the way to do it?
    Also what is the way to do the same thing with choosedate component?
    Thank you very much...

    Hi Turhan,
    You may want to read about the Partial Page Refresh (PPR) capabilities in ADF Faces. You can make the selectInputDate's partialSubmit property "true" and then cause the specific components you wish refreshed have their partialTriggers property set to the ID of the selectInputDate.
    Hope this helps,
    John

  • Why content of a vector element changes when new element added

    in my program, i instantiate 2 Vector objects. one is TV(temporary vector), the other one is V. they all get instances of Class vElement as elements to them(of course, casted to Object first).
    Class vElement only cantains an int n, an int[] array.
    i create a text file: input.txt
    in this text file, there are 2 rows of content:
    1 2 3 1001
    4 5 6 1002
    at the beginning when the program runs, each row of input.txt will be read into a respective instance of vElement, that is, e.g. n = 1001, array = {1, 2, 3}.
    and then the 2 instances would be casted as Objects and added to V as elements
    then TV starts to get a new vElement from some methods generats 7 8 9 1003
    after that, V will add TV's newly-got element as its 3rd element.
    what is dramatical is that, the array of V's 1st element { {1, 2, 3} 1001 } will change to be the same as its 2nd one{{4, 5, 7} 1001 } after the 3rd element added to V from TV, yet, 1001 will not change to be 1102.
    this problem has challenged and tortured me for quite some days. who can help to conquer it?
    thanks a lot more!!

    I had the same problem. I believe this is because Vector stores references of everything it is added into it. My problem was solved by creating a new array everytime I had to add an element to Vector.
    Instead of:
    My_vector.addElement(My_array)
    I did:
    String[ ] Prov_array = new String[My_array.length];
    System.arraycopy(My_array,0,Prov_array, 0,My_array.length);
    My_vector.addElement(Prov_array);
    Might not be the best solution but it solved the problem.

  • Refresh the Panel or Scrollpane in a frame?

    When I open a frame the panel in the scrollpane is transparant . but if you scroll it will fill with the color I gave. It will also fill if I minimalize and then maximalize.
    I tried validate, update , repaint

    Hey, well I've had the same question. repaint() doesn't seem to work. Anyway, I've found a trick that works sometimes.
    JPanel oustidePane = new JPanel(new BorderLayout());
    JPanel labelPane = new JPanel();
    label = new JLabel(" ");
    label.setPreferredSize(new Dimension(10,10));
    //or smaller, i actually didn't set a size
    labelPane.add(label);
    outsidePane.add(labelPane, BorderLayout.SOUTH)
    ousidePanel.add(yourPanelorScrollPanel, BorderLayout.CENTER);
    //put this somewhere where you can access label from
    //other ods
    JLabel label;
    then add this ousidePanel where you would have added your panel.
    when you want to refresh your window, try something like this:
    void refresh()
    if(label.getText() == " ")
    label.setText(" "); //two spaces this time
    else
    label.setText(" "); // back to one space
    let me know if this works for you

  • Firefox was a good, but now it's slow and when I search google I have to refresh the page when I click the back button. This is driving me to other browsers.

    When searching in goole, If I click on a link and want to go back a page firefox does not load the previous google search without refreshing the page. Because I use google frequently this is very annoying. Firefox has also been freezing and crashing most frequently of any of the other browsers that I have been driven to use. I'm not sure why I should keep it on my computer at this point.

    Regarding the Google results page blanking out when you go back, this occurs when using a combination of three settings, which may be fairly common:
    * Zoom level higher than two steps (120%; the newest versions of Windows apparently default to 125%, which Firefox detects and adopts)
    * Google search set to instant prediction results (default on Google search, but can be disabled in Search settings, see [https://support.google.com/websearch/answer/186610 Google Instant Search Help])
    * Opening results in the same tab, then using the Back button to return to the results page (default on Google search, but can be changed in Search settings to open results in a new window/tab, see [https://support.google.com/websearch/answer/425 Google Search Help])
    Firefox's cache feature attempts to maximize speed for forward and back actions by storing the last rendering of the page. Something about the instant prediction results ''with zoom'' is causing Firefox to briefly display the results and then they blank out and you have to reload the page to get them back. The mystery is why this only occurs (so far as I have heard) on Google? Is one of Google's scripts blanking out the page? Does Google care that it's messing up Firefox users?
    For now, if you do not want to or cannot change any one of the three factors needed to experience this problem, you can disable the storage of the last rendering of the page. Then Firefox will skip the shortcut and lay it out fresh, which is known to work. As noted in earlier posts, you make this change using the about:config preferences editor.
    (1) In a new tab, type or paste '''about:config''' in the address bar and press Enter. Click the button promising to be careful.
    (2) In the search box above the list, type or paste '''sess''' and pause while the list is filtered.
    (3) Double-click the '''browser.sessionhistory.max_total_viewers''' preference and change it to 0 (that's a zero).
    This thread has a lengthy discussion: [https://support.mozilla.org/en-US/questions/970863 When I go back to Google search results page, it takes me to a blank Google screen].

  • Snapped cursor jumps when new plot added

    I have an XY graph in while i have a "snap to point" cursor on. When I add a new plot to it.. the cursor moves plots.. but I would like it to stay still... if anyone knows.. why would this happen? not to mention.. how would I go about getting it to stay still. I have a attachment of what Im doing, on top is before adding a plot.. then below is when i added the plot.. (i have it set up so it changed the color of the plot when the cursor is snapped to its point, so thats what the color change is.)
    Attachments:
    xygraph19735.gif ‏52 KB

    You may also try either setting the Active Plot Property of the graph to the original plot number before and after adding new data or read the cursor's index position prior to adding the plot and simply resetting it to that position after the data is loaded.
    See the example attached.
    2006 Ultimate LabVIEW G-eek.
    Attachments:
    Cursor.vi ‏50 KB

  • What HTTP caching headers will prevent iPhoto from re-downloading each image in a "Photo Feed" every time it checks the feed for new content?

    I've noticed a practical issue with iPhoto's File->"Subscribe to Photo Feed..." feature.
    Every time that iPhoto checks a subscribed RSS Photo Feed for new content it will re-download each and every photo in the feed.  This occurs even if iPhoto has already downloaded each image, they all have unique GUIDs set, and no content in the feed has changed since the last time it polled for it.
    My best guess is that this happens if the server offering the feed does not produce the proper cache-control parameters in the HTTP Headers that are sent by the server when the RSS feed is accessed by iPhoto.
    Does anyone know what parameter/value pairs need to be set in the HTTP headers to prevent iPhoto from re-downloading RSS enclosures that it already has?
    This is a very practical problem for feeds with a large number of photos of large file size.  Besides the obvious massive waste of bandwidth, the user receives an annoying error whenever they try to quit iPhoto before the feed and all of it's images have been re-downloaded yet again.

    Here is an example of the HTTP headers for two of the images in the feed.
    Any red flags in there that you think might be causing iPhoto to think it needs to re-download the images after it's already downloaded them once?
    HTTP/1.1 200 OK
    Content-Length: 1251893
    Date: Fri, 27 Jan 2012 15:37:49 GMT
    Server: Apache
    Set-Cookie: PHPSESSID=1b9d47ae170ba8c0a088ab7124a1677e; path=/
    Expires: Mon, 24 Jan 2022 15:37:49 GMT
    Cache-Control: max-age=315360000,public
    Pragma: public
    Last-Modified: Thu, 26 Jan 2012 23:34:38 GMT
    Accept-Ranges: none
    Connection: close
    Content-Type: image/jpeg;
    HTTP/1.1 200 OK
    Content-Length: 744151
    Date: Fri, 27 Jan 2012 15:39:01 GMT
    Server: Apache
    Set-Cookie: PHPSESSID=086c112f99ccecc266a47d66d6b47733; path=/
    Expires: Mon, 24 Jan 2022 15:39:01 GMT
    Cache-Control: max-age=315360000,public
    Pragma: public
    Last-Modified: Thu, 26 Jan 2012 02:54:40 GMT
    Accept-Ranges: none
    Connection: close
    Content-Type: image/jpeg;

  • Why does Safari refresh the page when using the back button?

    Safari didn't use to do this.
    Even on these forums, when you hit the back button to go back exactly where you were at, if there are new posts, the entire page may have changed. I knew exactly the next post I wanted to look at before the page was refreshed. Now, I can't even find the post I wanted to read unless I scroll through the entire list again.
    I need to be able to go back to the page I was just on and not have it refresh.
    I need to go back exactly where I was.
    Safari can't even go back properly as it wants to go back near the top of the last page I was on.
    I need it to go back exactly where I was at.
    I have no idea what the engineers are thinking about this one.
    FireFox works properly when going back to the prior page.
    I have long lists on pages I work with.
    For example:
    1. through 1,000.
    If I am on reference number 500 on the previous page, when I hit back, it goes all the way back up to around 20 in the list.
    I have to then scroll manually page down to 500 where I was at.
    This is tedious, cumbersome and unnessesary.
    Safari was much better before it was updated to this horrible behavior.
    I don't know of any preferences you can change to change this odd behavior.
    Anyone know of anyway to stop this horrible behavior in Safari?
    This is like reading a book, but when you go back a page, the entire page may have changed and I have no idea where I was at.
    Pretty $iss poor in my opinion.

    Yes, that is correct.
    However, you can also use the mouse or trackpad to swipe back a page and it still refreshes the last page.
    Safari never did this back in Snow Leopard and maybe some versions of Safari in Lion.
    However, Safari in Mountain Lion always does this.
    It is very cumbersome using the "open link in new window" or "open link in new tab".
    It was much better just being able to click the back button or swiping to get back exactly where you were on the prior page.
    Hopefully more people will send Apple feedback on this.
    Thanks for sharing.

  • Cannot see any new content added??

    What new content has been added this week? I have looked and cannot see any new content.
    I thought new content was added every Thursday?

    jam2000 wrote:
    What new content has been added this week? I have looked and cannot see any new content.
    I thought new content was added every Thursday?
    Content is added on a friday, but we currently have titles missing on the classic platform (old software) which haven't been added yet and I hope they don't try adding these tomorrow as the new content
    response from the vision guys and they’ve confirmed that there 10 more assets (movies) which were not listed in the HD Category on Classic, but it does appear as if there are 20 odd titles missing from the Classic platform. We will add the missing assets (movies) into the category and will investigate the titles which are missing from the platform.

  • Chnages required in Config when new PSA added

    Hi All,
    I want to know the changes those are required to made in the configuration when a new PSA added to the current system.
    Thanks in advance.
    Regards,
    Sekhar.

    Hi Sekhar,
    The changes those are required in configuration when a new Personnel Sub Area added are:
    Changes in Enterprise Structure and Time Management Settings as
    Enterprise Structure: creation of new PSA
    Assignment of Pay scale structure to Enterprise structure
    Define Personnel Subarea Grouping for Primary Wage Type
    Define Groupings for the Public Holiday Calendar
    Group Personnel Subareas for the Work Schedule
    Generate Work Schedules Manually
    And let me know which modules you are having in your project, so that I can provide specific module help for you.
    Regards,
    Srinivas.

  • Refreshing the JUTreeNodeBinding when we use whereclause with the view

    Hi There,
    I am facing a problem with refreshing the JUTreeNodeBinding after adding a whereclause to the underlying view object. I have a BC4J view object for a database table which has a parent-child relationship between the rows. This is established using a VL between the same view. Now on click of a button we add a whereclause to the view object (parent/source view object). Lets say it appends a whereclause like:
    QRSLT (where deleted = true)
    And then I execute the query for the underlying view object. It refreshes the 1st level nodes accordingly. But the child nodes remains as it is and the whereclause application is not reflected. I have tried finding the VL and then getting the destination end (a view object) and setting the whereclause for it followed by an execute query on the same. This does not affect the child nodes. I have tried traversing through all the nodes and getting the user objects using ((JUTreeNodeBinding)node.getUserObject()) and tried refreshControl() as well.
      private void executeDestinationQuery(ViewObject vo, String viewLinkName, String whereClause)
        ViewLink vl = vo.getApplicationModule().findViewLink(viewLinkName);
        ViewObject destVo = vl.getDestination();
        destVo.setWhereClause(whereClause);
        destVo.executeQuery();
        private void executeQueryOnChildNodes(JUTreeNodeBinding nodeBinding)
          nodeBinding.refreshControl();
          java.util.List children = nodeBinding.getChildren();
          if(children != null)
            for(Iterator childrenItr = children.iterator(); childrenItr.hasNext();)
              executeQueryOnChildNodes((JUTreeNodeBinding)childrenItr.next());
        }

    Hi,
    Do you use ADF binding ? If yes, why do you refresh the tree node on teh business service and not the binding layer, in which case the UI would be refreshed accordingy ?
    Frank

  • Cannot edit a field that is "Standard Report Column" when new row added

    Hi everyone,
    I have created a master-detail form from the wizard and within the detail report region source I have used apex_item.xxx API
    example;
    select C1, C2,
    CASE when C2 ='N' then
    apex_item.select_list_from_query(3, C3,'select a1 d, a2 r from table1', 'ENABLED', 'NO',null,null, 'f03_#ROWNUM#')
    else
    apex_item.select_list_from_query(3, C3,'select a1 d, a2 r from table1', 'DISABLED', 'NO',null,null, 'f03_#ROWNUM#')
    END C3
    from table;
    All columns C1,C2,C3 are defined as "Standard Report Columns".
    The results allows the column C3 field to be enabled or disabled for input depending on a condition.
    The problem is when you hit the default button "Add Row" to add a new row. The row is non-editable and is populated with null values.
    What I want is to allow input when a new row is inserted into the multi-row detail form.
    Can any one help?
    Is there a way to change the Display As field for the new row columns to "text field" from "standard report column" dynamically?

    I think you will need to use the old way of adding rows instead of the new one. I remember having headaches trying to get it working.
    Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.apress.com/9781430235125
    http://apex.oracle.com/pls/otn/f?p=31517:1
    http://www.amazon.de/Oracle-APEX-XE-Praxis/dp/3826655494
    -------------------------------------------------------------------

  • CS6 Update Failure - Error U43M1D204 (new content added to question)

    Web and Design Premium install.  I get this error when running an Adobe Application Manager update in any of the products.  Per one tech note  found, I deleted the local profile folder for the logged on admin user where the updates are downloaded and then applied (AAMUpdater).  Same issue.  The logs in that folder don't shed any light on the problem that I can see.
    Addition:  This is a network command line install from a package. The first package was incorrectly configured so that updates could not be applied by an administrator logon.  Repacked with the correct setting, uninstalled on the workstation, and reinstalled via the new network package to discover this issue. 
    QUESTION:  Is their a tech note on a manual uninstall of CS6 suite in case the control panel uninstall did not remove everything and the product is in some sort of inconsistent state regarding update patches?
    Message was edited by: MichaelFaulkner

    Manish:  As I just emailed you, and in the hope of helping someone else, on the two machines I tested, I needed to do two different procedures in order to avoid the update error:
    First system:  Uninstall the incorrectly configured AAME3 package, run the Adobe cleanup tool http://www.adobe.com/support/contact/cscleanertool.html, and reinstall the new correctly configured package, run updates.
    On the second system, I did the same steps as listed above, but then also had to logon as another admin user that had never logged onto the workstation as I was receiving the same error after the reinstall with an existing admin local profile.  Then updates ran.
    NOTE:  The first system install was run manually via a batch file while an administrator was logged on.  The second one was installed via a deployment tool without any user being logged on.
    Next test will be on a workstation after hours without any previous AAME3 package installed, just using the correctly configured one with updates allowed configured, without anyone being logged on. 

Maybe you are looking for