Text  rendering in Java swing textfield is incorrect but works fine in awt

Hi
I am having a specific problem regarding
Malayalam Language (An indian language) rendering in Java swing textfield rendering is incorrect for some specific malayalam chars
റ്റ ട്ട
But for awt text filed every thing looks fine
Any clue regarding this issue
Pl help
John India

Thank you
I too think in the same way , but I am trying with very popular malayalam fonts and
Windows 7 is works fine with default malayalam font karthika in apps like note pad ,word , iexplorerer
I tried a set of other fonts also some problem or other is with swt but
awt it works very nice
Is there any tool available to check all glyphs are , available or not ,
regards
john
Edited by: user3656685 on Jul 20, 2012 9:53 AM

Similar Messages

  • Rendered images are not appearing on the webpage. works fine on IE. All plugins appear to be present includeing Adobe Flash

    rendered images are not appearing on the webpage. works fine on IE. All plugins appear to be present including Adobe Flash

    If that only happens on a specific page or domain then make sure that you do not block images on that domain.
    See [[Images or animations do not show]]
    *A way to see which images are blocked is to click the favicon (<i>Site Identification</i> icon) on the left side of the location bar.
    *A click on the "More Information" button will open the Security tab of the "Page Info" window (also accessible via "Tools > Page Info").
    *Go to the <i>Media</i> tab of that "Tools > Page Info" window.
    *Select the first image link and scroll down though the list with the Down arrow key.
    *If an image in the list is grayed and there is a check-mark in the box "<i>Block Images from...</i>" then remove that mark to unblock the images from that domain.
    *You can see the permissions for the domain in the current tab in Tools > Page Info > Permissions
    *You can see all image exceptions in Tools > Options > Content: Load Images > Exceptions

  • [SOLVED] Since updating to Java 1.6.0_33 on my MacBook running OSX 10.6.8, websites say Java not installed in Firefox, but works in Chrome

    I work for User Testing, which uses a Java-based screen recorder to make videos of people using commercial websites and offering spoken feedback on the site. Since installing the Java 1.6.0_33 update for Snow Leopard on my MacBook, the User Testing screen recorder does not recognize that Java is installed, and won't work.
    If I switch to Chrome, all works smoothly. I have the latest version of Firefox, and have installed the latest updates. I have opened Java Preferences in my Utilities, and made sure that the checkbox "Enable applet plug-in and Web Start applications" is checked. I have cleared the cache and cookies in Firefox. The problem still persists.
    User Testing says no other Mac users have reported the problem, and so they cannot help me. I rely on a Firefox add-on that is not available for Chrome to notify me of new User Testing jobs (which are normally claimed in seconds), so it is not practical for me to simply switch to Chrome or another browser.
    Interestingly, when checking my plugins in order to fill out the information required below in this help request, I was sent to a Firefox page that says "For your safety, Firefox has disabled your outdated version of Java. Please upgrade to the latest version."
    When I click the link, it says that Apple supplies its own version of Java, which of course I have already installed. Guess this is the root of the problem, but how do I fix it?
    EDITED TO ADD SOLUTION:
    After even more Googling, I eventually stumbled on the solution. In the Firefox menu, I chose Help>Troubleshooting Information, and clicked "Show in Finder" under Application Basics. I then quit Firefox, clicked on the Profile folder, deleted the file "pluginreg.dat", and restarted Firefox. Java now shows up among my plugins, and is enabled by default. The failure of pluginreg.dat to update automatically was supposed to be an old Firefox problem that has been solved, but apparently that is not always the case.
    Thank you to everyone who answered.

    I read somwhere that firefox disables certain versions of java because it might give control of your computer to other malicious websites
    I think you have to go to the java website and down load the version you need and enable it in firefox's prefrences
    Sorry I may be a veteran in using firefox, but I know very little since I hardly had problems with mozilla untill just very recently hope this helps

  • Wrong XML parsing in Java  6.0 , the same code works fine with Java 5.0

    I have the following xml data in a file ( C:\_rf\jrebug.xml ) :
    <?xml version="1.0" encoding="UTF-8"?>
    <rs>
         <data
              input3='aa[1]'
              input4='bb[1]'
              input6='cc[2]'
              input8='dd[7]'
              output2='ee[7]'
              output4='ff[511]'
              output6='gg[15]'
              output7='hh[1]'
         />
    </rs>
    I have the following code to parse this XML data :
    import java.io.IOException;
    import javax.xml.parsers.DocumentBuilder;
    import javax.xml.parsers.DocumentBuilderFactory;
    import javax.xml.parsers.ParserConfigurationException;
    import org.w3c.dom.Document;
    import org.w3c.dom.Element;
    import org.w3c.dom.NamedNodeMap;
    import org.w3c.dom.NodeList;
    import org.w3c.dom.Node;
    import org.xml.sax.SAXException;
    import org.xml.sax.ErrorHandler;
    import org.xml.sax.SAXParseException;
    public class DomParserBug {
         Document dom;
         public void runExample() {
    parseXmlFile("C:\\_rf\\jrebug.xml");
              parseDocument();
         private void parseXmlFile(String filename){
              //get the factory
              DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
              //dbf.setValidating(true);
    dbf.setValidating(false);
              try {
                   //Using factory get an instance of document builder
                   DocumentBuilder db = dbf.newDocumentBuilder();
                   db.setErrorHandler(new MyErrorHandler());
                   //parse using builder to get DOM representation of the XML file
                   dom = db.parse(filename);
              }catch(ParserConfigurationException pce) {
                   pce.printStackTrace();
              catch(SAXParseException spe) {
                   spe.printStackTrace();
              catch(IOException ioe) {
                   ioe.printStackTrace();
              catch(SAXException se) {
                   se.printStackTrace();
    private void parseDocument()
    Element docEle = dom.getDocumentElement();
    NodeList nl = docEle.getElementsByTagName("data");
    if(nl != null && nl.getLength() > 0)
    for(int i = 0 ; i < nl.getLength();i++)
    Element el = (Element)nl.item(i);
    NamedNodeMap attrsssss = el.getAttributes();
    for (int ii=0; ii<attrsssss.getLength(); ++ii)
    Node attr = attrsssss.item(ii);
    System.out.println("Attribute name is =" attr.getNodeName() " AND Attribute value is ="+attr.getNodeValue());
         public static void main(String[] args){
              DomParserBug dpe = new DomParserBug();
              dpe.runExample();
         class MyErrorHandler implements ErrorHandler {
              public void error(SAXParseException e) {
              System.out.println("error : " +e.toString());
         // This method is called in the event of a non-recoverable error
         public void fatalError(SAXParseException e) {
         System.out.println("fatalError : " +e.toString());
         // This method is called in the event of a warning
         public void warning(SAXParseException e) {
         System.out.println("warning : " +e.toString());
    The parsed output is :
    Attribute name is =input3 AND Attribute value is =aa[1]
    Attribute name is =input4 AND Attribute value is =bb[1]
    Attribute name is =input6 AND Attribute value is =cc[2]
    Attribute name is =input8 AND Attribute value is =dd[7]
    Attribute name is =output2 AND Attribute value is =ee[7]
    Attribute name is =output4 AND Attribute value is =ff[511]
    Attribute name   is  =output6 AND Attribute value  is =hh[1]]
    Attribute name   is  =output7 AND Attribute value  is =hh[1]
    THE LAST TWO LINES ARE SIMPLY WRONG.
    With java 5.0 the last two lines are parsed correctly :
    Attribute name   is  =output6 AND Attribute value  is =gg[15]
    Attribute name   is  =output7 AND Attribute value  is =hh[1]
    I have seen this issue only after I upgraded to java 6.0. I have searched the java 6.0 bug database but there is nothing there.
    I have also submitted a bug to the bugdatabase last month but have not heared anything.
    Anybody have any clue about this ???
    Thanks
    Edited by: skaushik on Jan 4, 2008 12:40 AM
    Edited by: skaushik on Jan 4, 2008 6:38 PM

    I have seen similar issue. I found that if you remove the square brackets from the first line in teh XML file, the last two lines are parsed correctly.
    Replace the follwing line : :
    Attribute name is =input3 AND Attribute value is =aa[1]
    with :
    Attribute name is =input3 AND Attribute value is =aa
    and the output is CORRECT :
    Attribute name is =input3 AND Attribute value is =aa
    Attribute name is =input4 AND Attribute value is =bb[1]
    Attribute name is =input6 AND Attribute value is =cc[2]
    Attribute name is =input8 AND Attribute value is =dd[7]
    Attribute name is =output2 AND Attribute value is =ee[7]
    Attribute name is =output4 AND Attribute value is =ff[511]
    Attribute name   is  =output6 AND Attribute value  is =gg[15]
    Attribute name   is  =output7 AND Attribute value  is =hh[1]

  • No voice when selecting "start speeking" in mail, but works fine in Safari and text edit.

    No voice in "mac mail" on IMac Lion 10.7.2. when I select Start speeking,
    Works fine in Safari and text edit.
    Also works fine in Mail on my Macbook Pro 10.6.8

    I Plugged Headphones in to headphone jack and selected speech in mail and could here voice through headphones.
    Disconnected headphones and 'Mail' 'Speech' now plays fine through speakers ?

  • How can I fix my text messages I can only text one person from my contacts list is was working fine and now I can only text one person and I do have a plan and like I said I was texting fine   Pls help.  Thanxs

    How can I fix my text messages on my Iphone4s it was working fine but now I can only text one person from my contact list  I do have a plan and have tryed reset the iphone4s Can someone help me pls. Thanxs

    Why post the same information instead of responding to your initial post?
    https://discussions.apple.com/message/17160874#17160874
    Gonna go out on a limb here and say it's probably user error.

  • The Find function (Ctrl+F), mis-finds the desired simple text in Acrobat Standard, but works fine in Reader

    Adobe Acrobat X 10.1.13, Win 7 64bit, 
    The Find function (Ctrl+F), mis-finds the desired simple text. 
    This is not a scanned document.  When I search for some word that DOES exist in the document, Acrobat will highlight text that does not match at all and which does NOT contain the word.  If I select the actual word, copy and past the text, I get the selected text accurately, but when I paste the same selected text into the Find box to search for it, Acrobat still mis-finds. 
    HOWEVER, I can open the very same .PDF file in Acrobat Reader X and do not have the same problem - Find works correctly in Reader with the same .PDF. 
    What is going on?!  Both Acrobat standard, and Reader report that they are up to date.   Please help.

    Can you try rasterizing (converting the document to tiff/bmp) and then importing those image files (tiff/bmp) back in Acrobat.
    This would allow document to be re-OCRed and you will be able to search text in it. You can use lossless export/import settings to preserve the quality of ducment.
    For exporting the file:
    1: Go to File > Save As Other > Image > Tiff.
    2: Click on Settings button in the Save As Dialog and set the file settings as ZIP for Monochrome, Grayscale and Color.
    Now for importing the files back:
    1: Press Ctrl + K
    2: In the Preferences dialog, select Convert To PDF option in Categories.
    3: Choose tiff or bmp (as per the format used while exporting) and un-check Scan Optimization and OCR.
    4: Set Color and Grayscale to Zip and Monochrome to CCITT G4.
    5: Save the settings.
    6: Now import all the pages in Acrobat.
    7: You can use Combine Files feature to merge all the image files.

  • Problem: Animation publishing incorrectly, but working in Cp preview.

    Hi,
    I created an animation in Flash CS5 with some code in it (see below for the code). What the code does is it allows the user to play/pause the movie by pressing the spacebar. It allows that keyboard shortcut to be used on all slides except certain ones (in this case: slides 9, 13, and 15). I just need to drop this animation onto the first slide of my Cp project, and the function works throughout the rest of the project. When I hit F4 to preview, it works great, but when I publish it, it has problems: It won't work, for starters, but also, when I go to a slide, press the spacebar, and then go back to the previous slide, the play/pause button down on the playbar shows the 'play' icon (meaning the video should be paused), but the video continues to play. The play/pause button in the playbar and the keyboard shortcut do nothing. Keep in mind that it works perfectly when I 'F4' it, just not when I publish it and open the SWF. Usually when stuff works in Cp but not when published, its something in the publish settings that's the problem, but I can't find anything in there that would help. Plus, F4ing the project within Cp should factor in the publish settings. Just to be clear, all I need help with is making the published file work exactly like the F4 preview. The code is below, and thanks to anyone that can help.
    // Keyboard Shortcut: Play/Pause (Space)
    stage.addEventListener(KeyboardEvent.KEY_DOWN, keypressPause);
    function keypressPause(event:KeyboardEvent):void
        switch(event.keyCode)
                case Keyboard.SPACE :
                var myRoot:MovieClip = MovieClip(root);
                var mainmov:MovieClip = MovieClip(myRoot.parent.root);
                if (mainmov.cpInfoCurrentSlide != 9 &&
                    mainmov.cpInfoCurrentSlide != 13 &&
                    mainmov.cpInfoCurrentSlide != 15)
                        if (mainmov.rdcmndPause == 1)
                            {mainmov.rdcmndResume = 1;}
                            else
                            {mainmov.rdcmndPause = 1;}
                        break;

    The issue is the way the code is obtaining Captivate's main time line (mainmov).  When you F4 the movie, it's being loaded differently than when you F12 web preview... thus the main time line is obtained differently.  Here's a way to search for the main time line and the rest of the code:
    import flash.display.DisplayObject;
    import flash.display.DisplayObjectContainer;
    import flash.utils.describeType;
    import flash.display.MovieClip;
    var mainmov:MovieClip = findMainMovie();
    // Keyboard Shortcut: Play/Pause (Space)
    stage.addEventListener(KeyboardEvent.KEY_DOWN, keypressPause);
    function keypressPause(event:KeyboardEvent):void
        switch(event.keyCode)
                        case Keyboard.SPACE :
                        if (mainmov.cpInfoCurrentSlide != 9 &&
                                  mainmov.cpInfoCurrentSlide != 13 &&
                                  mainmov.cpInfoCurrentSlide != 15){
                                            if (mainmov.rdcmndPause == 1){
                                                      mainmov.rdcmndPause = 0;
                                                      mainmov.rdcmndResume = 1;
                                            }else{
                                                      mainmov.rdcmndPause = 1;
                                                      mainmov.rdcmndResume = 0;
                        break;
    //Returns the Captivate MainTimeLine
    function findMainMovie():MovieClip
              var cpMovie:MovieClip;
              //cpMovie = parent.parent.parent;
              cpMovie = findParentByType(this.parent, "CaptivateMainTimeline") as MovieClip;
              return cpMovie;
    //Iteratively finds a parent object by type
    function findParentByType(source:DisplayObject, parentType:String):DisplayObjectContainer {
              var currentTarget:DisplayObjectContainer = source.parent;
              while (currentTarget != null) {
                        if (describeType(currentTarget)[email protected](parentType) >= 0) return currentTarget;
                        currentTarget = currentTarget.parent;
              return null; // We're at the root
    The code to search for the main time line was gleaned from CpGears written by Whyves
    I'd encourage you to think about making this into a Captivate static widget using the CpGears framework or the WidgetFactory framework by Tristan Ward.  Either framework will make your life much easier.
    I usually set the two variables in tandem: rdcmndPause and rdcmndResume so that all variables stay in sync.
    When I dropped the animation into the Cp project, I had to set it to display for "rest of project" in order for it to work across all slides.
    Report back and let us know how it goes.
    Jim Leichliter

  • Firefox blocks email features when using dotEasy email. The formatting bar is not available when trying to write a text. If I open dotEasy in Chrome it works fine. Why?

    I'm using Windows XP. When opening dotEasy.com with Mozilla Firefox and password into my account, the email account opens but the formatting bar is missing. When I open dotEasy with Chrome, it works. Why?

    You can try to modify the user agent to Firefox/9.0.2 in case it fails on browser detection.
    *https://support.mozilla.org/kb/latest-firefox-issues
    *User Agent Switcher: https://addons.mozilla.org/firefox/addon/user-agent-switcher/
    If that works then you can contact the website to inform them that they need to revise their browser detection code.
    *http://hacks.mozilla.org/2012/01/firefox-goes-2-digit-time-to-check-your-ua-sniffing-scripts/

  • Loading large files in Java Swing GUI

    Hello Everyone!
    I am trying to load large files(more then 70 MB of xml text) in a Java Swing GUI. I tried several approaches,
    1)Byte based loading whith a loop similar to
    pane.setText("");
                 InputStream file_reader = new BufferedInputStream(new FileInputStream
                           (file));
                 int BUFFER_SIZE = 4096;
                 byte[] buffer = new byte[BUFFER_SIZE];
                 int bytesRead;
                 String line;
                 while ((bytesRead = file_reader.read(buffer, 0, BUFFER_SIZE)) != -1)
                      line = new String(buffer, 0, bytesRead);
                      pane.append(line);
                 }But this is gives me unacceptable response times for large files and runs out of Java Heap memory.
    2) I read in several places that I could load only small chunks of the file at a time and when the user scrolls upwards or downwards the next/previous chunk is loaded , to achieve this I am guessing extensive manipulation for the ScrollBar in the JScrollPane will be needed or adding an external JScrollBar perhaps? Can anyone provide sample code for that approach? (Putting in mind that I am writting code for an editor so I will be needing to interact via clicks and mouse wheel roatation and keyboard buttons and so on...)
    If anyone can help me, post sample code or point me to useful links that deal with this issue or with writting code for editors in general I would be very grateful.
    Thank you in advance.

    Hi,
    I'm replying to your question from another thread.
    To handle large files I used the new IO libary. I'm trying to remember off the top of my head but the classes involved were the RandomAccessFile, FileChannel and MappedByteBuffer. The MappedByteBuffer was the best way for me to read and write to the file.
    When opening the file I had to scan through the contents of the file using a swing worker thread and progress monitor. Whilst doing this I indexed the file into managable chunks. I also created a cache to further optimise file access.
    In all it worked really well and I was suprised by the performance of the new IO libraries. I remember loading 1GB files and whilst having to wait a few seconds to perform the indexing you wouldn't know that the data for the JList was being retrieved from a file whilst the application was running.
    Good Luck,
    Martin.

  • How to use java api while java programming especially using javase and java swing?

    i need help for java api for undo, redo, htmleditorkit,editorkit.
    in my project i have to use java swing for desktop application but, i need help for how to implement and how to retrieve java api.
    please reply with example or code..

    i need help for java api for undo, redo, htmleditorkit,editorkit.
    in my project i have to use java swing for desktop application but, i need help for how to implement and how to retrieve java api.
    please reply with example or code..
    You find examples and code by searching the internet, not by using forums.
    Start with The Java Tutorials - it has trails for the bulk of the Java functionality.
    See the trail 'How to Write an Undoable Edit Listener'
    http://docs.oracle.com/javase/tutorial/uiswing/events/undoableeditlistener.html
    You learn by DOING - not by reading. Actually DO the tutorial example and try to understand WHAT it does and HOW it does it.
    Then search for other tutorial trails that are of interest.

  • java.io.File instance .list() not working properly

    i want to get the file, folders in any directory, so i used the File.list() method.
    but it is working in a peculiar manner. first see my simplified code, where the problem i am having::
    public class FileChildTest {
         public static void main(String[] args) {
              try{
                   String[] s=new java.io.File(args[0]).list();
                   for (int i = 0; i<s.length; i++){
                        System.out.println (s);
              catch(java.lang.Exception ex){
    now, say i saved it in c:\MyJava directory. now when i run it with cmd line argument c: in stead of listing the file/folders in c: drive it lists the file/folders of c:\MyJava directory. in any other case its working fine.
    now if i save the file in d:\MyJava\src. again it gives same problem when CLA is d: , but working fine for any other arg.
    now xplain me why is this happening. do i have any fault or what?
    and whats the solution.
    can ne1 pls.

    to b more scecific, in the 2nd case it lists the files/folders of d:\MyJava\src folder.

  • PL/SQL and Java Swing interface

    Everybody in this forum knows that Oracle is the best database around
    with many functionalities, stability, performance, etc. We also know
    that PL/SQL is a great language to manipulate information directly
    in the database with many built in functions, OOP capability,
    transaction control, among other features. Today an application that
    manipulates information, which needs user interface, requires components
    to be developed using different technologies and normally running in
    different servers or machines. For example, the interface is done using
    a dynamic HTML generator like JSP, PHP, PL/SQL Web Toolkit, etc.
    This page is executed in an application server like Oracle iAS or
    Tomcat, just to name two, which in turn access a database like Oracle to
    build the HTML. Also rich clients like Java applets require an intermediate
    server to access the database (through servlets for example) although
    it is possible to access the database directly but with security issues.
    Another problem with this is that complexity increases a lot, many
    technologies, skills and places to maintain code which leads to a greater
    failure probability. Also, an application is constantly evolving, new
    calculations are added, new tables, changed columns. If you have an
    application with product code for example and you need to increase its
    size, you need to change it in the database, search for all occurrences
    of it in the middle-tier code and perhaps adjust interfaces. Normally
    there is no direct dependency among the tier components. On another
    issue, many application interfaces today are based on HTML which doesn't
    have interactive capabilities like rich-client interfaces. Although it
    is possible to simulate many GUI widgets with JavaScript and DHTML, it is
    far from the interactive level we can accomplish in rich clients like
    Java Swing, Flash MX, Win32, etc. HTML is also a "tag-based" language
    originally created to publish documents so even small pages require
    many bytes to be transmitted, far beyond of what we see on the screen.
    Even in fast networks you have a delay time to wait the page to be
    loaded. Another issue, the database is in general the central location
    for all kinds of data. Most applications relies on it for security,
    transaction and availability. My proposal is to use Oracle as the
    central location for interface, processing and data. With this approach
    we can create not only the data manipulation procedures in the database,
    but procedures that also control and manage user interfaces. Having
    a Oracle database as the central location for all components has many
    advantages:
    - Unique point of maintenance, backup and restore
    - Integrated database security
    - One language for everything, PL/SQL or Java (even both if desired)
    - Inherited database cache, transaction and processing optimizations
    - Direct access to the database dictionary
    - Application runs on Oracle which has support for many platforms.
    - Transparent use of parallel processing, clusters and future
    background technologies
    Regarding the interface, I already created a Java applet renderer
    which receives instructions from the database on how to create GUI
    objects and how to respond to events. The applet is only 8kb and can
    render any Swing or AWT object/event. The communication is done
    through HTTP or HTTPS using Oracles's MOD_PLSQL included in the Apache
    HTTP server which comes with the database or application server (iAS).
    I am also creating a database framework and APIs in PL/SQL to
    create and manipulate the client interface. The applet startup is
    very fast because it is very small, you don't need to download large
    classes with the client interface. Execution is done "on-demand"
    according to instructions received from the database. The instructions
    are very optimized in terms of network bandwidth and based on preliminary
    tests it can be up to 1/10 of a similar HTML screen. Less network usage
    means faster response and means that even low speed connections will
    have a good performance (a future development can be to use this in
    wireless devices like PDAs e even cell phones, just an idea for now).
    The applet can also be executed standalone by using Java Web Start.
    With this approach no business code, except the interface, is executed
    on the client. This means that alterations in the application are
    dynamically reflected in the client, no need to "re-download" the
    application. Events are transmitted when required only so network
    usage is minimized. It is also possible to establish triggering
    events to further reduce network usage. Since the protocol used is
    HTTP (which is stateless), the database framework I am creating will
    be responsible to maintain the state of connections, variables, locks
    and session information, so the developer don't need to worry about it.
    The framework will have many layers, from communication up to
    application so there will be pre-built functions to handle queries,
    pagination, lock, mail, log, etc. The final objective is to have a
    rich client application integrated into the database with minimum
    programming and maintenance requirements, not forgetting customization
    capabilities. Below is a very small example of what can de done. A
    desktop with two windows, each window with two fields, a button with an
    image to switch the values, and events to convert the typed text when
    leaving the field or double-clicking it. The "leave" event also has an
    optimization to only be triggered when the text changes. I am still
    developing the framework and adjusting the renderer but I think that all
    technical barriers were transposed by now. The framework is still in
    the early stages, my guess is that only 5% is done so far. As a future
    development even an IDE can be created so we have a graphical environment
    do develop applications. I am willing to share this with the PL/SQL
    community and listen to ideas and comments.
    Example:
    create or replace procedure demo1 (
    jre_version in varchar2 := '1.4.2_01',
    debug_info in varchar2 := 'false',
    compress_buffer in varchar2 := 'false',
    optimize_buffer in varchar2 := 'true'
    ) as
    begin
    interface.initialize('demo1_init','JGR Demo 1',jre_version,debug_info,compress_buffer,optimize_buffer);
    end;
    create or replace procedure demo1_init as
    begin
    toolkit.initialize;
    toolkit.create_icon('icon',interface.global_root_url||'img/switch.gif');
    toolkit.create_internal_frame('frame1','Frame 1',50,50,300,136);
    toolkit.create_label('frame1label1','frame1',10,10,50,20,'Field 1');
    toolkit.create_label('frame1label2','frame1',10,40,50,20,'Field 2');
    toolkit.create_text_field('frame1field1','frame1',50,10,230,20,'Field 1','Field 1',focus_event=>true,mouse_event=>true);
    toolkit.create_text_field('frame1field2','frame1',50,40,230,20,'Field 2','Field 2',focus_event=>true,mouse_event=>true);
    toolkit.set_text_field_event('frame1field1',toolkit.focus_lost_event,'demo1_set_upper',toolkit.get_text_method,'FIELD 1','false');
    toolkit.set_text_field_event('frame1field2',toolkit.focus_lost_event,'demo1_set_upper',toolkit.get_text_method,'FIELD 2','false');
    toolkit.set_text_field_event('frame1field1',toolkit.mouse_double_clicked_event,'demo1_set_lower',toolkit.get_text_method,'field 1','false');
    toolkit.set_text_field_event('frame1field2',toolkit.mouse_double_clicked_event,'demo1_set_lower',toolkit.get_text_method,'field 2','false');
    toolkit.create_button('button1','frame1',10,70,100,25,'Switch','Switch the values of "Field 1" and "Field 2"','S','icon');
    toolkit.set_button_event('button1',toolkit.action_performed_event,'demo1_switch_fields(''frame1field1'',''frame1field2'')','frame1field1:'||toolkit.get_text_method||',frame1field2:'||toolkit.get_text_method);
    toolkit.create_internal_frame('frame2','Frame 2',100,100,300,136);
    toolkit.create_label('frame2label1','frame2',10,10,50,20,'Field 1');
    toolkit.create_label('frame2label2','frame2',10,40,50,20,'Field 2');
    toolkit.create_text_field('frame2field1','frame2',50,10,230,20,'Field 1','Field 1',focus_event=>true,mouse_event=>true);
    toolkit.create_text_field('frame2field2','frame2',50,40,230,20,'Field 2','Field 2',focus_event=>true,mouse_event=>true);
    toolkit.set_text_field_event('frame2field1',toolkit.focus_lost_event,'demo1_set_upper',toolkit.get_text_method,'FIELD 1','false');
    toolkit.set_text_field_event('frame2field2',toolkit.focus_lost_event,'demo1_set_upper',toolkit.get_text_method,'FIELD 2','false');
    toolkit.set_text_field_event('frame2field1',toolkit.mouse_double_clicked_event,'demo1_set_lower',toolkit.get_text_method,'field 1','false');
    toolkit.set_text_field_event('frame2field2',toolkit.mouse_double_clicked_event,'demo1_set_lower',toolkit.get_text_method,'field 2','false');
    toolkit.create_button('button2','frame2',10,70,100,25,'Switch','Switch the values of "Field 1" and "Field 2"','S','icon');
    toolkit.set_button_event('button2',toolkit.action_performed_event,'demo1_switch_fields(''frame2field1'',''frame2field2'')','frame2field1:'||toolkit.get_text_method||',frame2field2:'||toolkit.get_text_method);
    end;
    create or replace procedure demo1_set_upper as
    begin
    toolkit.set_string_method(interface.global_object_name,toolkit.set_text_method,upper(interface.array_event_value(1)));
    toolkit.set_text_field_event(interface.global_object_name,toolkit.focus_lost_event,'demo1_set_upper',toolkit.get_text_method,upper(interface.array_event_value(1)),'false');
    end;
    create or replace procedure demo1_set_lower as
    begin
    toolkit.set_string_method(interface.global_object_name,toolkit.set_text_method,lower(interface.array_event_value(1)));
    toolkit.set_text_field_event(interface.global_object_name,toolkit.mouse_double_clicked_event,'demo1_set_lower',toolkit.get_text_method,lower(interface.array_event_value(1)),'false');
    end;
    create or replace procedure demo1_switch_fields (
    field1 in varchar2,
    field2 in varchar2
    ) as
    begin
    toolkit.set_string_method(field1,toolkit.set_text_method,interface.array_event_value(2));
    toolkit.set_string_method(field2,toolkit.set_text_method,interface.array_event_value(1));
    toolkit.set_text_field_event(field1,toolkit.focus_lost_event,'demo1_set_upper',toolkit.get_text_method,upper(interface.array_event_value(2)),'false');
    toolkit.set_text_field_event(field2,toolkit.focus_lost_event,'demo1_set_upper',toolkit.get_text_method,upper(interface.array_event_value(1)),'false');
    toolkit.set_text_field_event(field1,toolkit.mouse_double_clicked_event,'demo1_set_lower',toolkit.get_text_method,lower(interface.array_event_value(2)),'false');
    toolkit.set_text_field_event(field2,toolkit.mouse_double_clicked_event,'demo1_set_lower',toolkit.get_text_method,lower(interface.array_event_value(1)),'false');
    end;

    Is it sound like Oracle Portal?
    But you want to save a layer 9iAS.
    Basically, that was the WebDB.(Oracle changed the name to Portal when version 3.0)
    Over all, I agree with you.
    &gt;&gt;Having a Oracle database as the central location for all components has many
    &gt;&gt;advantages:
    &gt;&gt;
    &gt;&gt;- Unique point of maintenance, backup and restore
    &gt;&gt;- Integrated database security
    &gt;&gt;- One language for everything, PL/SQL or Java (even both if desired)
    &gt;&gt;- Inherited database cache, transaction and processing optimizations
    &gt;&gt;- Direct access to the database dictionary
    &gt;&gt;- Application runs on Oracle which has support for many platforms.
    &gt;&gt;- Transparent use of parallel processing, clusters and future
    &gt;&gt;background technologies
    I would like to build 'ZOPE' inside Oracle DB as a back-end
    Using Flash MX as front-end.
    Thomas Ku.

  • How to Update existing XML File Using Java Swing

    Hi,
    I am reading XML file and getting keywords into JList. When i add some keywords into JList through textfield and remove keywords JList, then after click on save button it should update xml file. How can i do it ?
    Please provide me some code tips for updating xml file
    This is the code that i am using for reading XML File:
    import javax.swing.*;
    import java.awt.event.*;
    import org.w3c.dom.Document;
    import org.w3c.dom.Element;
    import org.w3c.dom.NodeList;
    import org.xml.sax.SAXException;
    import java.io.IOException;
    import java.util.*;
    import java.text.Collator;
    import java.util.regex.*;
    import javax.xml.parsers.DocumentBuilder;
    import javax.xml.parsers.DocumentBuilderFactory;
    import javax.xml.parsers.ParserConfigurationException;
    import com.cloudgarden.layout.AnchorConstraint;
    import com.cloudgarden.layout.AnchorLayout;
    public class getKeywords extends JFrame implements ActionListener
    static JPanel p;
    static JLabel lbl;
    static JButton btnSave,btnAdd,btnRemove;
    static String path;
    static Vector v;
    static JList lstCur;
    static JTextField txtKey;
    Document dom;
    static image imgval;
    NodeList nodelstImage;
    static AnchorLayout anchorLay;
    private DefaultListModel lstCurModel;
    public getKeywords()
         super("Current Keywords");
        v=new Vector();
        p=new JPanel();
        txtKey=new JTextField(10);
        btnAdd=new JButton("Add");
        btnRemove=new JButton("Remove");
        btnSave=new JButton("Save");
        lbl=new JLabel("Current Keywords");
        lstCurModel=new DefaultListModel();
            lstCur=new JList();
            JScrollPane scr=new JScrollPane(lstCur);
        runExample();
         lstCur.setModel(lstCurModel);
         p.add(lbl);
         p.add(scr);
         p.add(txtKey);
         p.add(btnAdd);
         p.add(btnRemove);
         p.add(btnSave);
         add(p);
         btnAdd.addActionListener(this);
         btnRemove.addActionListener(this);
         btnSave.addActionListener(this);
         setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
    public static void main(String arg[])
         getKeywords g=new getKeywords();
         g.resize(250,400);
         g.setVisible(true);     
    public void actionPerformed(ActionEvent ae)
         if(ae.getSource()==btnAdd)
              lstCurModel.addElement(txtKey.getText());
         if(ae.getSource()==btnRemove)
              lstCurModel.remove(lstCur.getSelectedIndex());
         if(ae.getSource()==btnSave)
              //Code to Write
         public void runExample()
              //Parse the XML file and get the DOM object
              ParseXMLFile();
              //Get the Detail of the Image Document
              parseImageDocument();
              //Get the Detail of the LML Document
              //parseLMLDocument();
              //System.out.println(lmlval.Title);
         public void ParseXMLFile()
              //Get the Factory
              DocumentBuilderFactory builderFac = DocumentBuilderFactory.newInstance();
              try
                   //Using factory get an instance of the Document Builder
                   DocumentBuilder builder = builderFac.newDocumentBuilder();
                   //parse using builder to get DOM representation of the XML file
                   dom = builder.parse("LML.xml");
              catch(ParserConfigurationException pce)
                   pce.printStackTrace();
              catch(SAXException sax)
                   sax.printStackTrace();
              catch(IOException ioex)
                   ioex.printStackTrace();
         public void parseImageDocument()
              //Get the root element
              Element docImgEle = dom.getDocumentElement();
              //Get a nodelist for <Image> Element
              nodelstImage =  docImgEle.getElementsByTagName("Image");
              if(nodelstImage != null && nodelstImage.getLength() > 0)
                   for(int i = 0; i < nodelstImage.getLength(); i++)
                        //Get the LML elements
                        Element el = (Element)nodelstImage.item(i);
                        //Get the LML object
                        getImage myImgval = new getImage();
                        imgval = myImgval.getimage(el);
                        v.addElement(new String(imgval.Thumb));
                        String[] x = Pattern.compile(",").split(imgval.Keys);
                        for (int s=0; s<x.length; s++)
                        lstCurModel.addElement(x[s].trim());
                        //System.out.println(x[s].trim());
    }     Thanks
    Nitin

    You should update your DOM document to represent the changes that you want made.
    Then, using the Transformation API you simply transform your document onto a stream representing your file. Something like this:
    Transformer transformer = TransformerFactory.newInstance().newTransformer();
    transformer.setOutputProperty(OutputKeys.INDENT, "yes");
    // TODO - set indentation amount!
    Source source = new DOMSource(dom);
    Result result = new StreamResult(file);
    transformer.transform(source, result);Hope this helps.

  • A tiny font is used in many places across Java Swing applications (help!)

    In many places in Java but mostly in text boxes I'm seeing a very small font that is quite hard to read.
    I am seeing this all over the place in Java programs and it is getting on my nerves.
    I'm not sure what is causing this.
    I also encountered this issue when running Java on Windows XP.
    I really need help on how to solve this,
    Or maybe it is actually a bug with Java itself and Windows?
    An image of the problem in SwingSet2:
    [SwingSet 2 Tiny Font Example|http://img687.imageshack.us/img687/1373/swingset2tinyfont.png]
    System spec:
    Windows 7 Professional 32-bit (Aero is on)
    Java 6 Update 20
    English system locale and language
    No special dpi settings (default)
    Screen Resolution: 1280x1024
    Avast Antivirus 5.0
    An intel graphics card
    Edited by: Temp111 on May 9, 2010 7:38 AM

    camickr wrote:
    That is not a problem. Somewhere in that code the programmer uses setFont(....) to make it a smaller font. The default font of a text component does not behave like that.
    For more help create a [SSCCE (Short, Self Contained, Compilable and Executable, Example Program)|http://sscce.org/], that demonstrates the incorrect behaviour.
    Don't forget to use the Code Formatting Tags so the posted code retains its original formatting. That is done by selecting the code and then clicking on the "Code" button above the question input area.No, it's defiantly a problem. Probably in the default fonts that Swing uses in some places.
    I detected one place where I can easily trigger this issue, a JTextArea And the Windows Look and Feel, So here is a SSCCE for you:
    [Picture Of Tiny Font SSCCE With Tiny Font issue|http://img88.imageshack.us/img88/7876/tinyfont.png]
    import javax.swing.JFrame;
    import javax.swing.JTextArea;
    import javax.swing.UIManager;
    import javax.swing.UnsupportedLookAndFeelException;
    public class TinyFont {
         public static void main(String[] args) {
              try {
                   UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel");
              } catch (ClassNotFoundException e) {
                   e.printStackTrace();
              } catch (InstantiationException e) {
                   e.printStackTrace();
              } catch (IllegalAccessException e) {
                   e.printStackTrace();
              } catch (UnsupportedLookAndFeelException e) {
                   e.printStackTrace();
              JFrame frame = new JFrame("Tiny Font");
              frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              JTextArea textArea = new JTextArea("Tiny Font Test");
              frame.add(textArea);
              frame.setSize(150, 100);
              frame.setLocationRelativeTo(null);
              frame.setVisible(true);
    }But I also encountered this issue in other places that use Swing.
    Try SwingSet2 Source Code Tab for example: [SwingSet2|http://java.sun.com/products/jfc/jws/SwingSet2.jnlp]

Maybe you are looking for

  • Adding Overlay Titles/Date

    Hi, I'm new to Final Cut in general, so I have no previous experience with Final Cut 7. I have added a title to one of my videos, then a transition to the first actual video. When the first video segment appears, I want a small title bar at the botto

  • Downloading photos take an eternity

    I tried to download photos in phototheque and the importation seems to stop at the midlle (as I look on the litlle bar) I can't finish my importations I must use Force to quit..!

  • Quicktime won't play audio of .MOV files

    Quicktime displays the video portion of .mov files from my digital camera, but the audio sounds like a (very loud) jackhammer, and seems to hang. Ditto with other viewers (irfanview, etc.) that depend on Quicktime. However, Nero ShowTime plays the sa

  • Can I tell iTunes, on my desktop, to delete any apps that I don't have installed on my devices?

    I want to know if there is a way to ask iTunes to delete any and all unused mobile apps that I do not have installed on either of my mobile devices? I have apps that I haven't used in a long while and, while I can delete them manually, I was wonderin

  • Illustrator CS5.5 Transforms in Actions not working properly?

    I'm doing a simple transform action. I want to move an object to a value on the Y axis. First of all, after recording the action, and setting the Y value to 64 px, the action is recorded as 64 pt, not px. This happens regardless of my 'Units' setting