Some Java 6 quirks (JTable and non-proportional fonts)

Hi,
I just downloaded JDK 6 to check how hard it will be to replace Java 5 on our project. I realized it won't be painless =/
So far, the problems I found were:
1. one of our JTables simply stopped showing its content. It's a two-column table, with plain text cells. Weird thing is that we have much more complicated tables on the application, and they are all fine (detailed investigation still pending, I am just posting first impressions)
2. one of our "reports" is simply a JTextArea with fixed-width font (Courier), so that we can align text at specific positions just by inserting the right amount of spaces. Java 6 antialiased fonts somehow broke this, text can't be aligned anymore. Now, that's weird, antialiasing shouldn't mess with fixed-width fonts, just improve their rendering AFAIK.
Anyone else seeing similar behavior? Any tips?
Regards,
Andre

Create your GUI and start your app on the EDT. Also only do row manipulation on the EDT. Most Swing operations are not threadsafe and must be done on the EDT. If this app worked prior to Java 6, it was only by chance.
In other words:
1. Wrap your main() method's contents in a SwingUtilities.invokeLater().
2. Wrap your addRow(), removeRow(), JScrollBar.setValue() and any other GUI-related calls in a SwingUtilities.invokeLater().
Note that your Thread is so simple that it might be better to use a javax.swing.Timer instead of a Thread. Then your addRow() and removeRow() calls wouldn't need to be in SwingUtilities.invokeLater() since the Timer would only be called on the EDT.

Similar Messages

  • Is it possible to mix italic and non-italic fonts in an axis label?

    Is it possible to mix italic and non-italic fonts in an axis label in diadem reports?

    No, there is no chance to do this.
    You can only use the "Textobjekt" to mix italic and non-italic fonts.
    Thanks
    Klaus D

  • Lion OS and Non-English langugae

    Hi There,
    I have some issues with Lion OS and non-english language like arabic. for instance when I want to go through some websitel like مهاجرت به کانادا and کانادا مهاجرت and مهاجرت کانادا and اقامت کانادا I run into some messy words and when I check with snow leopard, every thing work perfectely. How can I figure that out?
    Thank you

    Could you send me a screen shot of what you mean by "messy words"?
    If you are using Safari, do you have the same problem with FireFox?

  • Current and Non Current

    Hello Experts,
    I am quite new in BPC and having some doubts relating to Current and Non current classifications in Balance Sheet while doing Consolidation.
    We have one Operational GL of Long term loan and based on the due dates we need to bifurcate that GL into current and non current portion in BPC for reporting purposes. As there is no due date concept in ECC; the whole amount comes under one GL only.
    Is there is any way to bifurcate a particular GL into Current and Non current based on due dates in BPC 10.0 nw?
    Regards,
    Rahul

    HI Rahul
    To explain further I will take you example of Current and non current portions of loan .
    The amount falling in each category should be determinable in ECC using a combination of account, due date etc depending on how amount is stored (for e,g, in case accounts payable , each line item
    carries a different due date).
    In BPC the 2 approaches are
    1) Having 2 accounts - loan current and non current in BPC
    1a) Amount determinable in ECC
    If the amounts are clear determinable at the time of extraction , the split can be done
    using the extractor logic (line item extractor would help in determining amount with
    the help of due date)
    1b)Manually derived
    In case amount are manually calculated ,the split could be done using input schedule or
    script logic where the split are taken as user input and pushed into the relevant GL
    2) 1 account and flow combination
    This basically means create statistical flos in BPC to represent current and non current
    say 'Cur01' or 'noncur
    2a)Amount determinable in ECC
    The transaction type could be filled with the identified value by extraction program when
    it determines nature and splits
    2b) Manually derived
    In the input schedule or script , the input can be saved agaisy the account and flow combination
    Regards
    Surabhi

  • Java Card Development Tool and Cards.

    Hello all,
    I'm thinking to purchase some Java Card Development Tools and Java Cards.
    Could you guys recommend any?
    Now I'm checking the Schlumberger's Cyberflex Access SDK. If I buy this, which card do I have to choose? 'Cyberflex Access Developer Card'?
    Howabout Gemplus? Oberthur? or G&D? and anything else?
    I look forward to hearing from you guys,
    Thank you.
    Julie.

    A list of Java Card development tools is available at http://wireless.java.sun.com/allsoftware/index.html#jcardtools

  • Non english fonts

    I have an iBook G4 running 10.4.8. For some reason, it will not print non-English fonts. As an example, I have New Peninim installed. Fontbook recognizes and verifies it. When I set that as the font in Textedit, it shows the text I type in but it does not show it in that font, which is Hebrew, but shows it in an English Font style. It does the same thing with most any other non-English font except for Cyrillic fonts, which it will show. Any ideas?

    See my reply to your later post
    http://discussions.apple.com/thread.jspa?threadID=745192&tstart=0
    chris

  • Proportional fonts in SAP MII Workbench

    It was whose idea to use proportional fonts (characters with variable-width) in the SAP MII Workbench??
    Is it possible at least to change it to courier or something..?

    Consider the following assignments:
    var someVariable = 'value1';
    var another            = 'anotherValue';
    var stuff                   = 'val';
    var v1                       = 'sadfsdfasdf';
    Now, if I change the font type in MII to non-proportional, it will look like this:
    var someVariable = 'value1';
    var another            = 'anotherValue';
    var stuff                   = 'val';
    var v1                       = 'sadfsdfasdf';
    That is the problem. I'm maintaining existing code that was formatted when using font type 'Dialog', but I exported the source code and I'm using my favourite text editor. And every normal text editor uses non-proportional fonts. If I align the equation marks in my text editor then the source code will slide using the default font, so I cannot save changes in the MII.

  • A while ago I wanted to download/buy an album on my iPhone 4 but I didnt have enough space so I deleted some stuff and downloaded the album. well ever since then my other music won't play, only that one album will play and none of my other music will play

    a while ago I wanted to buy an album but I didn't have enough space on my phone, (iPhone 4) so I deleted some things off my phone and downloaded the album. well ever since then all my other music won't play, only that one album will play. I thought it was because I havent been able to get the software update on my phone but I don't have enough space for that either. I deleted almost all my photos, all my apps, i deleted almost all the info that is on the apps that you can't delete, but it says I have too much music and I only have 45 songs!!!!!!!! and I don't want to delete them because that's what I'm trying to listen to but I can't because of whatever reason. PLEASE HELP!!

    1, you can't at the moment, though with iOS 5 in the Autumn, from http://www.apple.com/ios/ios5/features.html#photos :
    Even organize your photos in albums — right on your device
    2, by removing it from you synced from and re-syncing. Only photos taken with the iPad, copied to it via the camera connection kit, or saved from emails/websites etc can be deleted directly on the iPad (either via the trashcan icon in the top right corner if viewing the photo in full screen, or via the icon of the box with the arrow coming out of it in thumbnail view)
    3, the location of the photos that you synced to the iPad should be listed on the iPad's Photos tab when connected to your computer's iTunes.
    4, you can copy the photos from your iPad to your computer : http://support.apple.com/kb/HT4083 . You should also be able to delete them from the iPad as part of the transfer process to your computer, and it's then your choice whether to add them to your sync photo list so as to copy them back to the iPad. Copying them to your computer would allow you to organise them into folders and therefore be able to sync them back into separate albums.
    5, I don't use Dropbox either. There are some third-party browser apps in the iTunes App Store that allow you to download pages so that you can view them when offline e.g. Atomic Web (the whole page is saved within Atomic Web, it doesn't place a photo into the Photos app)
    6, deleting content should help. If you remove an app from your iPad then you also remove the content that it's got on the iPad - so if you then decide to reinstall it back onto the iPad then you will need to manually add back any content that you want in it. None of the Apple built-in apps (including Photos) can be removed from the iPad

  • I need some help resizing my images on PS6. I am using a mac and have been trying to resize with same resolution and constaining proportions but for some reaseon the smaller resized image appears pizelated.

    I need some help resizing my images on PS6. I am using a mac and have been trying to resize with same resolution and constaining proportions but for some reaseon the smaller resized image appears pizelated. Heres an image of before and after. The first image I use is a JPG 72dpi 1500px x1500px and I want to downsize it to 600x600px same res, but it keeps pixelating, this has never happened before. Any suggestions, thoughts?
    thanks!

    I wouldn't say pixelated; more like blurry.
    Like ConnectedCreative said, what steps are you using? Are you using "bicubic sharper" when resizing down?

  • JAX-RPC And Non-Java Web Service

    Hi,
    This is a total shot in the dark. I'm attempting to consume an RPC web service developed in Delphi. I've created a JAX-RPC client in NetBeans from the published WSDL, attached below. I've created calls to several of the procedures available. What's bizarre, at least to me, is that half of them work fine and half of them don't. In all cases where they don't I'm getting a returns SOAP envelope indicated an access violation, attached below. There are no errors in any of the server logs and the developer assures me that the procedures do, in fact, work from his client (also developed conveniently enough in Delphi).
    I'm willing to take him at face value for the moment and assume that the problem is in my client implementation, although I have no idea where it would lie. The only difference I've been able to gather between the features which work and those that don't is the size of the return package...it would most likely be much larger than the ones that don't work.
    The service is an ISAPI dll running under IIS on Windows Server 2003. Any clues or guidance anyone would be willing to provide would be most welcome. On to the files:
    There wasn't enough room to post the entire thing so I've included one working (CheckStock) and non-working (GetLibTrace) function.
    WSDL:
    <?xml version="1.0" encoding="UTF-8"?>
    <definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:xs="http://www.w3.org/2001/XMLSchema" name="IInnovaServiceservice" targetNamespace="http://tempuri.org/" xmlns:tns="http://tempuri.org/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/">
      <message name="CheckStock2Request">
        <part name="OPC" type="xs:string"/>
      </message>
      <message name="CheckStock2Response">
        <part name="QTY" type="xs:int"/>
        <part name="messages" type="xs:string"/>
        <part name="return" type="xs:int"/>
      </message>
      <message name="GetLibTrace5Request">
        <part name="LibName" type="xs:string"/>
      </message>
      <message name="GetLibTrace5Response">
        <part name="dimensions" type="xs:string"/>
        <part name="messages" type="xs:string"/>
        <part name="return" type="xs:int"/>
      </message>
      <portType name="IInnovaService">
        <operation name="CheckStock">
          <input message="tns:CheckStock2Request"/>
          <output message="tns:CheckStock2Response"/>
        </operation>
        <operation name="GetLibTrace">
          <input message="tns:GetLibTrace5Request"/>
          <output message="tns:GetLibTrace5Response"/>
        </operation>
      </portType>
      <binding name="IInnovaServicebinding" type="tns:IInnovaService">
        <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
        <operation name="CheckStock">
          <soap:operation soapAction="urn:InnovaServiceIntf-IInnovaService#CheckStock" style="rpc"/>
          <input>
            <soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:InnovaServiceIntf-IInnovaService"/>
          </input>
          <output>
            <soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:InnovaServiceIntf-IInnovaService"/>
          </output>
        </operation>
        <operation name="GetLibTrace">
          <soap:operation soapAction="urn:InnovaServiceIntf-IInnovaService#GetLibTrace" style="rpc"/>
          <input>
            <soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:InnovaServiceIntf-IInnovaService"/>
          </input>
          <output>
            <soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:InnovaServiceIntf-IInnovaService"/>
          </output>
        </operation>
      </binding>
      <service name="IInnovaServiceservice">
        <port name="IInnovaServicePort" binding="tns:IInnovaServicebinding">
          <soap:address location="http://172.20.10.145:8080/innovaservice.dll/soap/IInnovaService"/>
        </port>
      </service>
    </definitions>My client:
    package com.signet.innova.client;
    import com.signet.innova.client.interfaces.IInnovaService;
    import com.signet.innova.client.interfaces.IInnovaServiceservice_Impl;
    import java.net.URL;
    import java.rmi.RemoteException;
    import java.util.ArrayList;
    import javax.xml.namespace.QName;
    import javax.xml.rpc.Stub;
    import javax.xml.rpc.holders.Holder;
    import javax.xml.rpc.holders.IntHolder;
    import javax.xml.rpc.holders.StringHolder;
    import javax.xml.soap.MessageFactory;
    import javax.xml.soap.SOAPMessage;
    import javax.xml.ws.Dispatch;
    import javax.xml.ws.Service;
    public class InnovaClient {
        private void testConnection() {
            Stub stub = createProxy();
            IInnovaService service = (IInnovaService) stub;
            StringHolder sh1 = new StringHolder();
            StringHolder sh2 = new StringHolder();
            StringHolder sh3 = new StringHolder();
            IntHolder ih1 = new IntHolder();
            IntHolder ih2 = new IntHolder();
            IntHolder ih3 = new IntHolder();
            try {
                System.out.println("Calling checkStock()");
                service.checkStock("0103877866", ih1, sh1, ih2);
                System.out.println(" service returned => " + ih1.value + ":" + sh1.value + ":" + ih2.value);
            } catch (RemoteException re) {
                System.out.println(" service returned => " + re.toString());
            try {
                System.out.println("Calling getLibTrace()");
                service.getLibTrace("REGULAR", sh1, sh2, ih3);
                System.out.println(" service returned => " + sh1.value + ":" + sh2.value + ":" + ih1.value);
            } catch (RemoteException re) {
                System.out.println(" service returned => " + re.toString());
        private Stub createProxy() {
            return (Stub) (new IInnovaServiceservice_Impl().getIInnovaServicePort());
        public static void main(String[] args) {
            InnovaClient client = new InnovaClient();
            System.out.print("Running testConnection()...");
            client.testConnection();
    }The request and response packets are in my reply below. Ran out of characters. :o)
    Edited by: Pablo_Vadear on Dec 22, 2009 11:19 PM

    Correction from above...".it would most likely be much larger than the ones that don't work" should have been "it would most likely be much larger IN THE ONES THAT DON'T WORK". Sorry.
    The request:
    POST /innovaservice.dll/soap/IInnovaService HTTP/1.1
    Content-Type: text/xml; charset=utf-8
    Accept: text/xml, text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
    Content-Length: 484
    SOAPAction: "urn:InnovaServiceIntf-IInnovaService#CheckStock"
    User-Agent: Java/1.6.0_17
    Host: 172.20.10.145:8080
    Connection: keep-alive
    <?xml version="1.0" encoding="UTF-8"?>
    <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:enc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns0="urn:InnovaServiceIntf-IInnovaService" env:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><env:Body><ns0:CheckStock><OPC xsi:type="xsd:string">0103877866</OPC></ns0:CheckStock></env:Body></env:Envelope>POST /innovaservice.dll/soap/IInnovaService HTTP/1.1
    Content-Type: text/xml; charset=utf-8
    Accept: text/xml, text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
    Content-Length: 491
    SOAPAction: "urn:InnovaServiceIntf-IInnovaService#GetLibTrace"
    User-Agent: Java/1.6.0_17
    Host: localhost:8080
    Connection: keep-alive
    <?xml version="1.0" encoding="UTF-8"?>
    <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:enc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns0="urn:InnovaServiceIntf-IInnovaService" env:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><env:Body><ns0:GetLibTrace><LibName xsi:type="xsd:string">REGULAR</LibName></ns0:GetLibTrace></env:Body></env:Envelope>And the response:
    <?xml version="1.0"?>
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><NS1:CheckStockResponse xmlns:NS1="urn:InnovaServiceIntf-IInnovaService"><return xsi:type="xsd:int">0</return><QTY xsi:type="xsd:int">0</QTY><messages xsi:type="xsd:string">Item 0103877866 retrieved OK.
    Right side OPC.
    </messages></NS1:CheckStockResponse></SOAP-ENV:Body></SOAP-ENV:Envelope>
    HTTP/1.1 200 OK
    Date: Tue, 22 Dec 2009 23:18:40 GMT
    Server: Microsoft-IIS/6.0
    Content-Type: text/xml
    Content-Length: 486
    <?xml version="1.0"?>
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><SOAP-ENV:Fault><faultactor/><faultcode>SOAP-ENV:Server</faultcode><faultstring>Access violation at address 00000000. Write of address 00000000</faultstring></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope>Any help appreciated.
    Edited by: Pablo_Vadear on Dec 22, 2009 11:23 PM

  • Is it possible to load a non-standard image using some Java API?

    Hi,
    My "problem" is:
    1. I have an image called "mediterranean_sea.IMG" (non-standard image format)
    2. I need to process it (histogram, palette, etc).
    3. I'm wondering if it is possible to load this image an process it using some Java API.
    4. I've tried to do this using JAI but I think that this API only works with TIFF, PNG, JPEG, etc.
    Any idea?
    Thanks in advance,
    Roger

    [url http://forum.java.sun.com/thread.jsp?thread=468188&forum=31]Cross-post

  • Where can I buy a Java Card programmer, reader, and some cards

    Greetings,
    I'm working on making some activities for a high school computer science club. I want to do things that are tangible and experiential. Specifically, I'd like to setup some Java card labs to modivate Java programming. Can anyone advise me on where to buy cards, programmers and readers?
    Thanks very much.

    You can buy readers from many companies e.g. Schlumberger/Omnikey/Gemplus & Oberthur.
    Java Cards can be bought from Aspects software in a pack of 5 , see http://www.aspectssoftware.com/shop/products.html and also supply an IDE for development of Java Card applets. You can download an evaluation copy for free 60 days from the web-site at http://www.aspectssoftware.com/devtools/restricted/download.html.

  • Singleton and non singleton in webdynpro java

    Hi All,
    where we use singleton and non singleton in webdynpro application.please send me with any example (scenario).
    Regards
    Anand

    Hello Anand,
    I think that your question is for u201CWeb Dynpro Javau201D forum..
    Please use the correct forum for your question.
    In general:: http://wiki.sdn.sap.com/wiki/display/WDJava/SingletonandNon-Singleton+Nodes
    There is example at : http://wiki.sdn.sap.com/wiki/display/WDJava/DynamicUIGeneration
    u201CWelcome to Web Dynpro Java! u201C  Wiki : http://wiki.sdn.sap.com/wiki/display/WDJava/WelcometoWebDynproJava%21
    Thank you and best regards, Natalia Khlopina

  • I've can't open any applications on my Mac ! I tried to delete some files from safari (history) and then none of the apps including iphoto, safari, mail, facetime. I don't know how to fix it, help ? any idea ?

    I've can't open any applications on my Mac ! I tried to delete some files from safari (history) and then none of the apps including iphoto, safari, mail, facetime. I don't know how to fix it, help ? any idea ?

    Please read this whole message before doing anything.
    This procedure is a diagnostic test. It’s unlikely to solve your problem. Don’t be disappointed when you find that nothing has changed after you complete it.
    The purpose of the test is to determine whether the problem is caused by third-party software that loads automatically at startup or login, or by a peripheral device. 
    Disconnect all wired peripherals except those needed for the test, and remove all aftermarket expansion cards. Boot in safe mode and log in to the account with the problem. Note: If FileVault is enabled, or if a firmware password is set, or if the boot volume is a software RAID, you can’t do this. Ask for further instructions.
    Safe mode is much slower to boot and run than normal, and some things won’t work at all, including sound output andWi-Fi on certain iMacs. The next normal boot may also be somewhat slow.
    The login screen appears even if you usually log in automatically. You must know your login password in order to log in. If you’ve forgotten the password, you will need to reset it before you begin. Test while in safe mode. Same problem? After testing, reboot as usual (i.e., not in safe mode) and verify that you still have the problem. Post the results of the test.

  • Contiguous and non-contiguous multiple cell selection in JTable

    I desparately need your help on this.
    My appliaction contains a JTable. The users should be permitted to select multiple cells (both contiguous and non-contiguous) using
    Ctrl + Click -- add that cell the already existing selection
    Shift + Click -- add all cells in the range to the selection.
    I like to have the selection behaviour as that in Excel (where you could ctrl + click on any cell to add it to selection).
    Questions:
    ==========
    Is this behavior possible using JTable?
    How to do this?

    Hi, use
    JTable table = new JTable();
    DefaultListSelectionModel  dlm =  new DefaultListSelectionModel();
    dlm.setSelectionMode( ListSelectionModel.MULTIPLE_INTERVAL_SELECTION  ); //1( the first one should be the one you are looking for)
    or (choose 1 or 2, the rest stays the same)
    dlm.setSelectionMode( ListSelectionModel.SINGLE_INTERVAL_SELECTION );//2
    table.getColumnModel().setSelectionModel(dlm);
    table.setCellSelectionEnabled(true);Hope this helps.
    Greetings Michael.

Maybe you are looking for

  • Select Option in APD

    Hi All, I am trying to create select-option for selection screen for extraction of criteria data into application server. Can I create selection-screen through "ABAP Routine" in APD? If not, so how we can create selection-screen for the same? Regards

  • Something is eating up my memory!

    Hi all, Last year, for no reason I could discern, all of my memory dissapeared. I have an 80gig G5 - so lots of space. I have no music, no films no nothing saved on it. I have run programmes to delete all foreign languages. I've done everything I can

  • Unable to start service jms:

    Hi, When running imqbrokerd.bat I get the following error. Please can you help out. I am running this on windows 2000 server SP4. Thanks [27/Aug/2004:16:30:55 BST] ================================================================== Sun ONE Message Que

  • RAM - on app server x32

    Environment: Oracle App server X32 on RedHat X64 with 32G RAM My question is : APP Server it will user only 4G ram and 28 is unuse?

  • Can I use Time Machine on an external drive that has files already on it.

    Please excuse the silly question. New to mac, from PC. I have a 200g external hard drive that has my itunes library, photos and other assorted files on it. If I use time machine on this drive will it delete everything that is there, or can I use it i