CardLayout problem. This is totally weird....

Hi...
I have some code which uses a CardLayout to show two different panels. Card A is a "loading" type panel telling the user to wait as background stuff is being done. Card B displays data from the database.
showCardA()
do some stuff.... (get data from database which takes around 5 seconds)
showCardB()
For some strange reason, card A is never shown. If I comment out showCardB(), card A is displayed correctly. The database call is about 5 seconds so it's not flipping through too quickly.
I am using CardLayout correctly, but I am thinking that the problem has something to do with threading issues?????
This bug is totally totally baffling me.

You're blocking the event dispatch thread with your database stuff.
See http://spin.sourceforge.net for an explanation and a possible solution.
Sven

Similar Messages

  • ITUNES 8 Problem - this is a weird one.......

    I have a Nano 4th Gen and installed ITunes 8 today. When I try to run the app nothing appears on my pc screen but in my Task Manager it says that ITunes is running???
    Anyone suffered the same problem or have a solution to this yet???
    PS: I am running Windows XP SP2.
    Cheers!

    Hi, Kairty,
    I see you're new here. This is a user-to-user forum. Apple tech support doesn't actively participate. It's a big holiday weekend for many people so, it may take a little while for someone to get over Xmas dinner, log on, see your post and know what the answer is. You can contact Apple directly using the info found through the link "Contact Us" which is found at the lower right of every page.
    You might also try searching for your problem in search box that appears under the words "Search Discussions" (as opposed to the one at the very top of the page).
    Happy New Years!

  • Problem in displaying total no of pages in Smartform

    Hello experts,
    I have a problem while displaying total no of pages in Smartform.
    When no of pages are more than 10 then in total no of pages , a * is shown till current page is 9, then after it is displaying correct no of pages.
    I am using &sfsy-formpages& to get total no of pages.
    Ex: Like if I have 12 pages to print then i am getting 1/, 2/, 3/* .......... 9/* then 10/12 , 11/12, 12/12.
    Do i have to write some code for that ?? Please give your inputs to get the total no of pages.
    Thanks !

    Hi,
    Try this.
    Page &SFSY-PAGE& of &SFSY-FORMPAGES(4ZC)&
    Thanks,
    Anitha A

  • Problem in Formatting Total Column in Classic Table

    Hi,
    I am using Classic Table.
    I am able to format the column data but i am unable to format the column total value. I searched in forum and tryed something like in the following thread..
    Problem in formatting Total Value in advanced table
    since i am using Classic Tables i am unable to do it.
    I also tried the following
    OATableBean table = ....
    OATotalRowBean totalRowBean = (OATotalRowBean)table.getColumnFooter();
    System.out.println("Formattotal : "+totalRowBean);
    if (totalRowBean != null)
    oracle.cabo.ui.validate.Formatter formatter = new OADecimalValidater("#,##0.00;#,##0.00","#,##0.00;#,##0.00");
    totalRowBean.setAttributeValue(ON_SUBMIT_VALIDATER_ATTR, formatter);
    in this case the total is not formatted.
    I also refered developer guide. There i found how to set value to total column.. but how to get the value its not given..
    Any body pls help in this regards
    Thanks & Regards

    Hi,
    When i am using Classic Table i am able to format column data but i am not able to format the column Total
    Code i using ;
    OATableBean table = (OATableBean) webBean.findChildRecursive("EmpTestVO12");
    table.prepareForRendering(pageContext);
    OAMessageStyledTextBean totalBean = (OAMessageStyledTextBean)table.findChildRecursive("Salary");
    if(totalBean!=null)
    Formatter formatter = new OADecimalValidater("#,##0.00;(#,##0.00)","#,##0.00;(#,##0.00)");
    totalBean.setAttributeValue(ON_SUBMIT_VALIDATER_ATTR, formatter);
    //Properly formatting column data
    Whe i am using OAAdvance Table bean i am able to format the total but i am unabele to format the Column data. Using following code..
    OAAdvancedTableBean tableBean=(OAAdvancedTableBean)webBean.findChildRecursive("region2");
    tableBean.prepareForRendering(pageContext);
    OAColumnBean c1=(OAColumnBean)webBean.findChildRecursive("column12");
    if(c1!=null)
    c1.setAttributeValue(CURRENCY_CODE,"USD");
    Can anybody pls tell me how can i achieve both (column values and totals formatting) using either Classic Table or Advance Table..
    Thanks & Regards,
    Ram

  • Problem in displaying totals based on the Unit of measurement.

    Hi,
    I have Problem in displaying totals based on the Unit of measurement.
    I want to display the total in the output of the alv based on the unit of measurement. for example i have three fields in the output namely
    Matnr           Quantity      UOM
    51                10              EA
    61                10              KG
    71                10              KG
    In the total i should get
                    10         EA
                    20         KG
    Can anyone tell me how to do this?
    The basic req is the exclude the qty with unit EA(each) in the totals.
    Thanks,
    Amit

    H i,
    you can use the collect statement
    to get the proper result
    loop at itab.  ( all the records)
    move all the fields from itab to another
    collect itab1.
    write: itab1-fields, itab1-fields.
    endloop.
    this will solve your problem
    reward points if helpful,
    thanks & regards,
    venkatesh

  • Problem with the "Total By" icon

    Hi.
    Working with Answer I've a problem with the "Total By" icon when the fact displayed is semi-additive.
    I try to explain better:
    1) my fact table has the following dimensions
    Time (year granularity)
    City
    Type of contracts
    2) the fact table contains the fact "Number of Active Contracts"
    this fact is additive by City and Type but not by Year.
    The "Number of Active Contracts" is calculated usign 2 existing logical columns
    Sum (of Number Of Contracts (at base granularity)) / Count Distinct ( of Years )
    This fact express an average when more than year is involed in the aggregation,
    but express the exact number of contracts if the year is displayed as an output column of the report.
    This fact works well changing the aggregation in reports, but when I click on the "Total By" icon to show
    the totals its behaviour is different from expected.
    consider the report with the following columns:
    Yearm City, Number of Active Contracts
    Click her to view it: http://yfrog.com/euerrtotaliconj
    The "Total By" icon Instead of the sum divided by ditinct years involed, i.e. 1, shows the sum divided by the number of Cities.
    It seem it is counting 5 tiimes (= number of cities) the same year.
    But If make a report with
    Year, Number of Active Contracts
    Click her to view it: http://yfrog.com/mjoktotalj
    it works as expected !
    Many thanks,
    Andrea
    Edited by: aromani on 17-nov-2010 8.06

    Philipp is right to tell the developer that the toolbar is automatically disappearing after customizing the add-on on the toolbar. I tried it, and it looks like it gets attached to the Bookmark Tool bar. It may help to make sure all the Toolbars are visible in '''View> Toolbars. '''
    It may also be because I have too many extensions on my toolbar ( Too many favorites :-))

  • Problem with document total

    Dear All,
    I have problem adding an invoice through DI API with the total amount of 50,000 including VAT. The system is SBO 2005B, PL42; Document Setting is as following:
    - Rounding Method = By Document
    - Rounding Rule for Tax = Round Down
    - Round Tax Amount in Rows = False
    The following VBA code is used to add an invoice:
    Dim boInv As SAPbobsCOM.Documents
    Dim boCom As SAPbobsCOM.Company
    Set boCom = GetSboCompany() 'this function returns SBO company
    Set boInv = boCom.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oInvoices)
    boInv.CardCode = "Customer1"
    boInv.DocDate = #9/1/2008#
    boInv.DocType = dDocument_Items
    boInv.DocCurrency = "JPY"
    'Now add a invoice line
    'boInv.Lines.Add - No need for the first line
    boInv.Lines.ItemCode = "item1"
    boInv.Lines.VatGroup = "S01" 'VAT rate for Japan is 5%
    boInv.Lines.PriceAfterVAT = 50000
    boInv.Add 'add the invoice
    What I get is an invoice with:
    Gross Price = 50000 (in a line)
    Total (LC) = 47619 (in a line)
    Tax Amount = 2380.952381 (in a line)
    and
    Total Before Discount = 47619 (in a header)
    Tax = 2380 (in a header; fractional part was round down because of the Document Setting)
    Total = 49999 (in a header; which is different from Gross Price by 1 yen)
    However, if I enter this invoice directly from the screen, then there will be no difference between Gross Price (Price after VAT) and Total, so, the invoice will be created correctly.
    My question is how to add an invoice with the total amount of 50000? (Of course, 50000 is not the only "difficult" number, for example, 40000 also poses the same problem). I tried to use boInv.Lines.NetTaxAmount property to directly assign the tax amount (which is possible from the SBO screen), but in PL42 there's an error saying that this property is not yet implemented.

    Verner, thank you for advice. I also tried that way, but wasn't helpful. OK, I found a solution that is I think acceptible. I will describe it in short, for those who face such problem. Basic idea is to use XML to create an invoice. Here's the code:
    Dim boInv As SAPbobsCOM.Documents
    Dim boCom As SAPbobsCOM.Company
    Dim strXML As String
    Set boCom = GetSboCompany() 'this function returns SBO company
    'XML data will be supplied as string variable, not an external file
    gboCom.XMLAsString = True
    'Here you will create your XML stream. Important tags are <DocTotal> for the invoice header, and
    '<Quantity>, <PriceAfVAT> tags for invoice lines. If <DocTotal> is specified then you will get invoice with
    'this exact total amount. If sum of <Quantity> x <PriceAfVAT> is equal to '<DocTotal>, then
    'document level discount will be zero.
    strXML = "<BOM> ... </BOM>" 'building XML here
    Set boInv = gboCom.GetBusinessObjectFromXML(strXML, 0) 'Create an invoice object from XML
    boInv.Add 'add the invoice
    Edited by: Jandos Khalik on Sep 2, 2008 10:17 AM
    Edited by: Jandos Khalik on Sep 2, 2008 10:18 AM
    Edited by: Jandos Khalik on Sep 2, 2008 10:20 AM

  • Problem:  this mac is not reading an excell file after upgrading to yosemite.   My Mac is from 2009, it use to work perfectly but it wasn´t able to open some apps, thats why i upgrade it.   Now it once i donwload the zip it appears with an ".ods" ext

    Problem:  this mac is not reading an excell file after upgrading to yosemite.   My Mac is from 2009, it use to work perfectly but it wasn´t able to open some apps, thats why i upgrade it.   Now it once i donwload the zip it appears with an ".ods" extension
    i even already download a link
    http://www.microsoft.com/en-us/download/confirmation.aspx?id=44026
    which i read on another support page... but it doesnt allowed me to install it cause it says that i already have the disk of this program....
    Im afraid to erase it and not being able to get it back...
    What can i do!??
    Thanks in advance for this kind answer!!!

    fsolution wrote:
    Problem:  this mac is not reading an excell file after upgrading to yosemite...   Now it once i donwload the zip it appears with an ".ods" extension...
    If the "it" refers to a compressed (zipped) spreadsheet that you downloaded, the ".ods" extension is used by LibreOffice and probably OpenOffice (which are free versions of MS Office) for spreadsheets, which would suggest that wherever you're getting that "Excel" file from has switched to one of those programs. I've tried opening an .ods file from LibreOffice using MS Office 2013 for Windows and it does open though with a warning that some things have been changed. I don't know if Office for Mac can normally open .ods files. But if your need is to just open .ods files, take a look at LibreOffice.

  • Hot mail is not working after firefox upgrade. I am using Firefox 12.0. I did not have issue with hotmail, but I am facing problem this week .

    I am using Firefox 12.0. I did not have issue with hotmail, but I am facing problem this week after firefox upgrade. After entering login the page freeze. I am not able to continue.
    I reviewed the thread. I am not using Foxit.
    I reviewed hot mail forum. They suggest firefox upgrade causes this issue.
    I tried after clearing my browser's cache and cookies. The situation remain same. Any idea?
    What is the workaround?

    Firefox 3.6 needs the Java Second Generation Plugin which comes with newer versions than 1.6.0_03 - update Java, the latest version is 1.6.0_22

  • Hello - downloading app problems - this phone can only be usedto download apps in uk or something - think i am linking to the us apps  - how do i link to the uk apps?

    hello - downloading app problems - this phone can only be usedto download apps in uk or something - think i am linking to the us apps  - how do i link to the uk apps?
    ta

    You're welocme
    Depending on the size of the app or the connection speed when using Wi-Fi it could take a little longer to download. You can also try to download it onto your computer, might be faster, and sync it to the phone after that.
    Downloading past purchases from the App Store, iBookstore, and iTunes Store

  • I can not eliminate ASK engine from the list. It came back by itself. Please, tel me how I can eliminate this problem. Another problem, this browser is no longer compatible with some institutions. This new version might have some problems.

    '''I can not eliminate ASK engine from the list. It came back by itself. Please, tel me how I can eliminate this problem.
    Another problem, this browser is no longer compatible with some institutions. .'''

    Step by step, how did you arrive at seeing this agreement?

  • This is a weird start to my question; but i went to a music festival today and I was in a mosh pit and it was hot, and my iPhone 4 turned off and I was wondering weather it was from the heat or something else? And what I could do to fix it? Thankyou :)

    this is a weird start to my question; but i went to a music festival today and I was in a mosh pit and it was hot, and my iPhone 4 turned off and I was wondering weather it was from the heat or something else? And what I could do to fix it? Thankyou

    okay, thankyou for you help anyway 

  • Oops, something is not right... Flash Plug-In Warning Explanation: You do not have the Flash player installed on your browser. How to Fix the Problem: This game requires the Flash plug-in. Download the latest Flash player now.

    When I try to play certain games on pogo, I get this: Oops, something is not right...
    Flash Plug-In Warning
    Explanation:
    You do not have the Flash player installed on your browser.
    How to Fix the Problem:
    This game requires the Flash plug-in.
    Download the latest Flash player now.
    So I download latest still get error message

    It is best to go to the source, Adobe, to get their software and updates. Sometimes malware can infect sites with messages that appear legitimate, but will, instead, install malware/virus/trojan on your system. Read the following carefully to install and/or update Adobe Flash.
    There are 2 versions of Adobe Flash; an '''ActiveX version''' for IE only and a '''Plugin version''' for most other browsers including Firefox. On a Windows system, you should always update both individually. '''''You do not have Adobe Flash (aka "Shockwave Flash" in Add-ons > Plugins) installed.'''''
    #'''Using Firefox''', go to the following direct download link and SAVE the download to your desktop so you can find it later: http://fpdownload.adobe.com/get/flashplayer/current/install_flash_player.exe
    #When the download is finished, close Firefox (File > Exit '''''OR''''' Firefox button > Exit)
    #Click or double-click on the file you just saved to your desktop
    #*In the installation window that appears, click the box to the left of "I have read and...." to place a check mark in the box
    #*The "Install" button in the lower right corner will now be highlighted, click it.
    #*The installation is quick.
    #Start Firefox and test your installation here: https://www.adobe.com/software/flash/about/
    #Direct link ActiveX version for IE '''''only''''': http://fpdownload.adobe.com/get/flashplayer/current/install_flash_player_ax.exe
    '''If this reply solves your problem, please click "Solved It" next to this reply when <u>signed-in</u> to the forum.'''
    Not related to your question, but...
    You may need to update some plug-ins. Check your plug-ins and update as necessary:
    *Plug-in check: https://www-trunk.stage.mozilla.com/en-US/plugincheck/
    *Adobe Shockwave for Director Netscape plug-in: [https://support.mozilla.com/en-US/kb/Using%20the%20Shockwave%20plugin%20with%20Firefox#w_installing-shockwave Installing ('''''or Updating''''') the Shockwave plugin with Firefox]
    *Adobe PDF Plug-In For Firefox and Netscape: [https://support.mozilla.com/en-US/kb/Using%20the%20Adobe%20Reader%20plugin%20with%20Firefox#w_installing-and-updating-adobe-reader Installing/Updating Adobe Reader in Firefox]
    *Shockwave Flash (Adobe Flash or Flash): [https://support.mozilla.com/en-US/kb/Managing%20the%20Flash%20plugin#w_updating-flash Updating Flash in Firefox]
    *Next Generation Java Plug-in for Mozilla browsers: [https://support.mozilla.com/en-US/kb/Using%20the%20Java%20plugin%20with%20Firefox#w_installing-or-updating-java Installing or Updating Java in Firefox]

  • Problem in displaying total text in total line

    Hi...I am facing problem in displaying total text in first column of total line. Width of first column is sufficient to display text "TOTAL". But somehow its not getting displayed....Please Help...?
    code is as follows:
    ls_layout TYPE  slis_layout_alv .
    ls_layout-totals_text       = 'TOTAL'.
      ls_layout-colwidth_optimize = 'X'.
      ls_layout-no_vline          = 'X'.
      ls_layout-no_hline          = 'X'.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          i_callback_program     = gv_repid            " Report ID
          i_callback_top_of_page = 'TOP_OF_PAGE'
          is_layout              = ls_layout
          it_fieldcat            = gt_fieldcat         " Field Catlog
        TABLES
          t_outtab               = gt_cost_output      " Output Table

    hi me to i have the same problem
       FORM create_layout .
      data: text(20) TYPE c.
      it_layout-window_titlebar   = text.
      it_layout-colwidth_optimize = 'X'.
      it_layout-totals_text       = text-013."'Totals'(013).
      it_layout-cell_merge        = 'X'.
      it_layout-zebra             = 'X'.
    ENDFORM.         
    but no output total in alv
    also i had another broplem i had unit i wanna show it in total line and calc value in header

  • Problem with Grand total in Crystal report xi

    Post Author: eshwar_polawar
    CA Forum: Crystal Reports
    Dear all,
    I am facing the problem with Grand total field in Report footer.Please advise me how should we resolve it.
    My report design as follows
    Report Title
    Page Header section:
    charged date    fee_ description charge_ amount currency_code
    Group  Header #1(Group by bank_ref)
    Group Header #2(Group by Currency code)
    Details
    charged date    fee_ description charge_ amount currency_code
    Group Footer#2 
    (Sub Total )
    Running Total field(Fields to Summarize on Charge_amount, Evaluate on "Group2# change of currency code) ,Sum of Charge_amount,Currency_ code
    Report footer:
    Sum of (charge_amount) currecy code
    Example of data:
    charged date   fee desc   chrage amount  currencycode
    0000000060129
    CAD
    10-Oct-2007    Transfer     200   Cad
    11-Oct-2007  comm          150 cad
    Sub total                        350 Cad
    0000000060129
    CAD
    10-Oct-2007    Transfer     100   USD
    11-Oct-2007  comm          150  USD
    Sub total                        250 USD
    Grand total     should   350 CAD  but it is showing  all total amoun 1000 CAD ,Group by Curreny code in the table
                                        250 USD but it is showing all  total amount 1200 USD
    Please provide the solutions like:
    1).About Running total in Report footer section
    2).Formula on While printing records for grand total
    3).How will send links with subreports
    Thanks and Regards
    Eshwar

    Post Author: eshwar_polawar
    CA Forum: Crystal Reports
    eshwar_polawar:
    Dear all,
    I am facing the problem with Grand total field in Report footer.Please advise me how should we resolve it.
    My report design as follows
    Report Title
    Page Header section:
    charged date    fee_ description charge_ amount currency_code
    Group  Header #1(Group by bank_ref)
    Group Header #2(Group by Currency code)
    Details
    charged date    fee_ description charge_ amount currency_code
    Group Footer#2 
    (Sub Total )
    Running Total field(Fields to Summarize on Charge_amount, Evaluate on "Group2# change of currency code) ,Sum of Charge_amount,Currency_ code
    Report footer:
    Sum of (charge_amount) currecy code
    Example of data:
    charged date   fee desc   chrage amount  currencycode
    0000000060129
    CAD
    10-Oct-2007    Transfer     200   Cad
    11-Oct-2007  comm          150 cad
    Sub total                        350 Cad
    0000000060129
    CAD
    10-Oct-2007    Transfer     100   USD
    11-Oct-2007  comm          150  USD
    Sub total                        250 USD
    Grand total     should   350 CAD  but it is showing  all total amoun 1000 CAD ,Group by Curreny code in the table
                                        250 USD but it is showing all  total amount 1200 USD
    Please provide the solutions like:
    1).About Running total in Report footer section
    2).Formula on While printing records for grand total
    3).How will send links with subreports
    Thanks and Regards
    Eshwar

Maybe you are looking for