Java Swings Vs Flex which is better?

Hi,
   I do not know whether this is the right place to post this thread. We are planning to replace Java Swings client with Adobe Flex GUI. So I am in the process of analyzing the performances and advantages of Flex over Java Swings.
So, Can any one kindly let me know whether Flex supports all the features of Java Swings (like components... etc).
Actually my backend server is also Java and the communication between client and server is based on CORBA.
So, considering all these constraints please comment on this.
Regards,
Purush.

Both support object-oriented GUI development. The same core ideas apply to both, so the jump for a developer isn't too intense. Perhaps the largest difference is that Flex has XML layout files which is a nice plus (although many abuse the capability of injecting logic into it as well). JavaFX is the Java-world answer to Flex, so you may want to play around with that first since it will be more familiar.

Similar Messages

  • Change Java Swing to Flex?

    Hi,
    I am new to Flex. I need to know whether i can change my Java Swing to Flex( Redo in Flex) and use it as before
    The Solaris machine acts as Server and the server side code is in Java
    The Windows machine acts as Client and the client side code is in Java Swing.
    The Communication between the Server and the Client is through CORBA - Middle Level language.
    I need to change my Client Side programming from Java Swing to Adobe Flex.
    Is it possible to do that?
    I should not disturb my Server Side Code and the MiddleLevel(CORBA) part.But only redesigning the complete client side to FLEX.
    Can anyone guide me on this? I am new to Flex and i am trying to understand whether this will be possible for me to change to Flex.
    If we can do it, then how do i start.Please guide on the doc/tutorial to start with.
    Thanks in advance
    Regards
    S.

    I'm not familar with Corba and have not read about any kind of direct integration of it with Flex. The core design allows Flex to work with the array of standard services (HTTP, REST, SOAP, etc.). There is also the JavaScript ExternalInterace to consider if a JS solution exists. You may also want to look into the BlazeDS project which is a component of the Spring Framework designed to tie Java and Flex together in a number of fun ways.

  • Java Swing 1.1 Beta 2 problem

    I want to download Java Swing 1.1 Beta 2 , but i am not able to find any link for this download. Please help me.

    Thanks,its working now. Actually i was trying example from the below link...
    http://java.sun.com/products/jfc/tsc/articles/treetable1/
    which suggested to download Swing 1.1 Beta 2.
    I am using J2sdk 1.4 version.
    For compilation i had to change some of imports
    for example
    //import com.sun.java.swing.tree.*;
    //import com.sun.java.swing.table.*;
    to
    import javax.swing.table.*;
    import javax.swing.tree.*;

  • Which is better? JDO or Java Persistance API?

    Hi folks
    I'm trying to build an app on Google's cloud service.
    Looking into this ( [http://code.google.com/appengine/docs/java/overview.html|http://code.google.com/appengine/docs/java/overview.html]), it tells me that for java projects there are 2 possibilities for persistance - JDO , and Java Persistance. Does anyone have any advice on which is better and/or easier? Also, if anyone has a small example they could post, that would be very useful too.
    this isn't exactly a JDBC question, and maybe this should be posted somewhere else? If so please tell me where I should be asking this question.
    Thanks!
    -Tom

    I personally find Java Persistence to be easy to use and it works just fine.
    I can't say if you would agree. You'll just have to judge that for yourself, which means: put some effort into trying it out. I'd start by not requesting small examples in a forum, but by actually looking for them yourself using your search engine of choice.

  • Which is better ? Toplink Java objects or Toplink Entities ?

    Hi
    We are planing to use Toplink JPA that comes with JDeveloper 11g preview release
    I have a question here!
    I would like to get clarified which is better to use :
    1. Toplink Java Objects from Tables ,
    2.Toplink Entities from Tables
    Could you suggest the best approach, and pros and cons of both the approaches?
    Thanking you ,
    Samba

    Samba,
    Ultimately both are using the same TopLink runtime. In the case of Entities you are using JPA and Java Objects you are using TopLink native API and metadata.
    Going forward I would recommend JPA with TopLink extensions as required.
    Doug

  • JAVA(Ajax + (SVG or XAML)) is better than JAVA(Swing or SWT)?

    A new startup claims it has invented a process to create reusable Ajax GUI Classes that are better than Java/Swing classes.
    http://cbsdf.com/misc_docs/why-gui-api.htm
    http://cbsdf.com/misc_docs/gui-api-brief.htm
    It has published the innovative process and many examples on the web site and challenging the software community to prove it wrong.
    Any takers?
    It claims the process is very simple any Java developer with some JavaScript experience can validate the process.
    Imagine the implications if they are right, and if it costs less to create a graphics intensive online application than the cost of creating a comparable Java/Swing application?

    Crosspost: http://forum.java.sun.com/thread.jspa?threadID=716694&messageID=4140147

  • Need help for connecting Ms Acces with java Swing in Mac OS

    Hi all,
    i need to connect to Ms Access in MAc os through my java swing program.
    Is it possible for accessing Ms access through dsn in Mac OS.
    If Possible which driver shall i use for Establishing Connection with MS Access in Mac OS.
    Suggestion is needed urgently.
    Can anybody help me out regarding this..
    Thanks in advance.
    Regards,
    sreand

    if I don't find a better solution I'll try your 2nd option but what do you mean by "combo" update?
    My understanding is to simply insert the OS 10.5 installation CD, reinstall the OS and the just keep updating it via the OS SSoftware update panel and stop untill I see the scary Java 8 update. Is that what you meant?
    While you can do it that way, the combo update picks up operating system updates through a collection of releases. When dealing with operating system upgrades, I've found using the combo updates to be more reliable than Software Update, as sometimes Software Update doesn't apply updates correctly, and weird things can happen. Doesn't happen often though, thankfully.
    So the OS X 10.5.5 Combo update contains all updates between 10.5.0 and 10.5. The 10.5.8 combo update contains the updates from 10.5 thru 10.8. Here are the updates:
    10.5 combo update: http://support.apple.com/kb/DL692
    10.8 combo update: http://support.apple.com/kb/DL866
    If you go down the combo path, repair permissions before and after doing each update. Then do Software Update for any other non-OS X updates, and don't apply the Java Update 8.

  • How to use a DropDownList in Java Swing.Its very very Urgent

    Hi Sir,
    Here i need to know how to do (or) create a dropdownlist by using Java Swing.I know that there is JMenuBar & JMenuItems without using that when i click a JButton for example the dropdownlist should come from the top to bottom.I have already posted this quesion once.And i found that it has been removed.So i hope that this time i will get a better answer.Pls.do provide the code as well sir.So that i will be very thankful to u.Since i am involved in a project which contains this
    feature.It is very very Urgent.So pls.do provide the code i will be waiting for the reply.
    Thanx,
    m.ananthu

    use JComboBox
    JComboBox liste = new JComboBox(new Object[]{"azerty","qwerty});the api documentation :
    http://java.sun.com/j2se/1.4.2/docs/api/javax/swing/JComboBox.html
    the turotial on combobox :
    http://java.sun.com/docs/books/tutorial/uiswing/components/combobox.html

  • GWT meets  Flex:  Java API  for Flex

    Hello people,
    I m  somedays away to release the  version 2.1 of gwt4air. gwt4air is an open source project  based on  gwt (http://code.google.com/webtoolkit/)  and provides a Java API to different platform where Java is not the primary language.
    Version 2.0 added among other features  support for Adobe AIR, Alive PDF, Pure PDF, Aswing and other GWT based  UI libraries like  EXT-GWT
    With version 2.1  i added support for Flex(AIR and Browser). The goal of this approach is to make it easy for Java Developers to switch  to Flex be leveraging  a swing like API. But also to  present an alternative to the classical Flex developement. The overall idea behind this is described here:
    http://code.google.com/p/gwt4air/wiki/Beginn
    A demo application ca be found here: http://gwt4air.appspot.com/
    The application contains around 100 demos with source code illustrating the use of the api.
    I ve tried to keep the API similar to the AS3 api  so one could easely  switch from AS3 to Java and vice versa
    Note that this  flex applicaton is entirely written in Java using gwt4air. No AS3 no MXML.
    The application is still in alpha stage so please expect some errors.
    The project home is located at:
    http://code.google.com/p/gwt4air/
    I m looking forward to hear what you think about this idea. Any inputs (good or bad)  is really welcome
    Help me make this an even better tool.
    It s about time that  Flex rocks the GWT world
    cheers,
    Alain

    It looks like those genius @google are also thinking about a Java(GWT) API for Flash .
    http://www.youtube.com/watch?v=F_sbusEUz5w&t=1718
    Glad to see  that i m not a fool
    Or alteast not the only fool that believe  combining  Java and Flash/Flex is a potent mix.

  • Draggable buttons in Java Swing

    Hi,
    I want to develop an application in Java Swing. The application I am going to develop is an application for developing other applications. I want my application to include a button which also acts as a drag and drop UI element. For example, I want my application to include a button for adding a picture. There are 4 buttons of different pictures. If a user wants to add a picture he can either click on one of these buttons and that picture will be added somewhere on the screen or dragging this button and drop it and that picture will be added where he dropped that button.
    Could anyone please tell me…
    1. If I can develop an application which includes Drag and Drop UI element if I develop it in Java Swing
    2. If a button (or other UI element) can act as both a button and a drag and drop element if I develop my application in Java Swing
    3.
    Could you please tell me where I can find some screenshots of applications which has been developed in Java Swing? I am not familiar with this program and I am not that good at programming, so I would like to get some impression of how it might look like.
    Thanks in advanced

    1. the good thing about Swing is that it is very flexible and with clever programming you can do just about anything. The problem is that depending on your requirements, this could require a great deal of programming that can be very hard to implement such that it works properly on all popular platforms (windows, linux, mac).
    2. see 1.
    3. Swing applications are "skinnable", you can give them a great number of different appearances. The default is to give the application a system look and feel, so they look pretty much like any other application for that platform. This means that when you run your application on Windows, it will look like a Windows application, if you run it on a Mac it will look like a Mac application, etc.
    I am not familiar with this program and I am not that good at programmingThat is quite a problem, because Swing is not the easiest API around. It requires a solid knowledge of Java and Object Oriented Programming in general as the entire API is based heavily on OOP concepts. To get a better idea of Swing, read through the Swing tutorial here:
    http://java.sun.com/docs/books/tutorial/uiswing/

  • Flex Builder 3 Beta 3 Mac OS X Installer Error

    I am trying to install Flex Builder 3 Beta 3 on an Intel Mac
    running Mac OS X 10.4.11. When I open the installer, the first
    screen (which allows you to select languages) works properly. The
    second screen, however, does not load properly - I only see a black
    background and white text that says "InstallAnywhere by
    Macrovision", a thin white line by this, and a grayed-out "N".
    There are no buttons or other text on this page.
    Does anyone have this same problem? If so, are there any
    fixes? I initially had this problem with Mac OS X 10.4.10.
    Upgrading to Mac OS X 10.4.11 did not fix the error. A similar
    error also occurs when I try to install the demo version of Flex
    Builder 2.
    Thanks!

    Thanks for sending the error log - that provides some good
    clues. First of all, I want to ask you about the path listed as
    /Users/admin/. Was admin a default user already on your machine, or
    did you create and log in as a user named admin?
    The installer is failing because it cannot create a folder
    under the path /Users/admin/Documents/, whereas usually you should
    have full access to that folder if the user named admin has normal
    Admin rights.
    Here are some suggestions for how you can remedy that:
    1) run Apple's Disk Utility, run its Repair Permissions
    option, and see if it repairs permissions on that Documents folder
    2) manually delete any existing folder named
    /Users/admin/Documents/Flex Builder 3/
    3) try installing Flex Builder 3 again, after cleaning things
    up in steps 1 and 2.
    Failing that, try creating a new user on that machine, with
    Admin rights, and then see if you can install Flex Builder 3 into
    that user account.
    Let me know how it goes,
    C. Agruss
    Flex Builder Team
    quote:
    Originally posted by:
    kemppro
    Install Directory: /Users/admin/Documents/Flex Builder 3/
    Status: ERROR
    Additional Notes: ERROR - java.lang.Exception: Cannot
    replace existing file /Users/admin/Documents with a directory
    All Install Actions Beneath this Action have not been
    installed.
    hi,
    it's conforting to know that is not a system version problem.
    I copied bellow my log problem:
    Install Directory: /Users/admin/Documents/Flex Builder
    3/.metadata/
    Status: ERROR
    Additional Notes: ERROR - Install Parent 'Flex Builder 3'
    failed!
    Install Directory: /Users/admin/Documents/Flex Builder
    3/configuration/
    Status: ERROR
    Additional Notes: ERROR - Install Parent 'Flex Builder 3'
    failed!
    Also I called the technical support, nobody can help me. You
    are my only hope....

  • What is difference between C# Gzip and Java swing GZIPOutputStream?

    Hi All,
    I have a Java swing tool where i can compress file inputs and we have C# tool.
    I am using GZIPOutputStream to compress the stream .
    I found the difference between C# and Java Gzip compression while a compressing a file (temp.gif ) -
    After Compression of temp.gif file in C# - compressed file size increased
    while in java i found a 2% percentage of compression of data.
    Could you please tell me , can i achieve same output in Java as compared to C# using GZIPOutputStream ?
    Thank a lot in advance.

    797957 wrote:
    Does java provides a better compression than C#?no idea, i don't do c# programming. and, your question is most likely really: "does java default to a higher compression level than c#".
    Btw what is faster compression vs. better compression?meaning, does the code spend more time/effort trying to compress the data (slower but better compression) or less time/effort trying to compress the data (faster but worse compression). most compression algorithms allow you to control this tradeoff depending on whether you care more about cpu time or disk/memory space.

  • 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.
    >>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
    I would like to build 'ZOPE' inside Oracle DB as a back-end
    Using Flash MX as front-end.
    Thomas Ku.

  • Problem with java swing button and loop

    Problem with java swing button and loop
    I�m using VAJ 4.0. and I�m doing normal GUI application. I have next problem.
    I have in the same class two jswing buttons named start (ivjGStart) and stop (ivjGStop) and private static int field named Status where initial value is 0. This buttons should work something like this:
    When I click on start button it must do next:
    Start button must set disenabled and Stop button must set enabled and selected. Field status is set to 1, because this is a condition in next procedure in some loop. And then procedure named IzvajajNeprekinjeno() is invoked.
    And when I click on stop button it must do next:
    Start button must set enabled and selected and Stop button must set disenabled.
    Field status is set to 0.
    This works everything fine without loop �do .. while� inside the procedure IzvajajNeprekinjeno(). But when used this loop the start button all the time stay (like) pressed. And this means that a can�t stop my loop.
    There is java code, so you can get better picture:
    /** start button */
    public void gStart_ActionEvents() {
    try {
    ivjGStart.setEnabled(false);
    ivjGStop.setEnabled(true);
    ivjGStop.setSelected(true);
    getJTextPane1().setText("Program is running ...");
    Status = 1;
    } catch (Exception e) {}
    /** stop button */
    public void gStop_ActionEvents() {
    try {
    ivjGStart.setEnabled(true);
    ivjGStart.setSelected(true);
    ivjGStop.setEnabled(false);
    getJTextPane1().setText("Program is NOT running ...");
    Status = 0;
    } catch (Exception e) {
    /** procedure IzvajajNeprekinjeno() */
    public void IzvajajNeprekinjeno() {  //RunLoop
    try {
    int zamik = 2000; //delay
    do {
    Thread.sleep(zamik);
    PreberiDat(); //procedure
    } while (Status == 1);
    } catch (Exception e) {
    So, I'm asking what I have to do, that start button will not all the time stay pressed? Or some other aspect of solving this problem.
    Any help will be appreciated.
    Best regards,
    Tomi

    This is a multi thread problem. When you start the gui, it is running in one thread. Lets call that GUI_Thread so we know what we are talking about.
    Since java is task-based this will happen if you do like this:
    1. Button "Start" is pressed. Thread running: GUI_Thread
    2. Event gStart_ActionEvents() called. Thread running: GUI_Thread
    3. Method IzvajajNeprekinjeno() called. Thread running: GUI_Thread
    4. Sleep in method IzvajajNeprekinjeno() on thread GUI_Thread
    5. Call PreberiDat(). Thread running: GUI_Thread
    6. Check status. If == 1, go tho 4. Thread running: GUI_Thread.
    Since the method IzvajajNeprekinjeno() (what does that mean?) and the GUI is running in the same thread and the event that the Start button has thrown isn't done yet, the program will go on in the IzvajajNeprekinjeno() method forever and never let you press the Stop-button.
    What you have to do is do put either the GUI in a thread of its own or start a new thread that will do the task of the IzvajajNeprekinjeno() method.
    http://java.sun.com/docs/books/tutorial/uiswing/index.html
    This tutorial explains how to build a multi threaded gui.
    /Lime

  • Certificate support in Java Swing application

    Hi There,
    I am new to this Certificate thing and running into issues! Would appreciate for all the help and please ignore for any stupid questions.
    Here is my scenario.
    1. I do have a client server application and client is a java swing application which connects to a Server application (Using Jetty 4.2.22 as embedded server)
    2. Initially, it had a self signed certificate but goal is to support third party certificate (i.e import in the server and then show warning to the client during login)
    If somebody has already done this or point me to some example (using Jetty APIs) that would be great help. If not, here is what I am trying to do and some questions.
    1. I tried to get some free SSL certificate from the web and imported into the server's KeyStore.
    If I do a list from the server using Keystore, this is what it looks like
    keytool -list -keystore /tmp/keystore -storepass genview
    Keystore type: JKS
    Keystore provider: SUN
    Your keystore contains 2 entries
    self, Dec 3, 2008, PrivateKeyEntry,
    Certificate fingerprint (MD5): 0D:58:E8:77:89:09:F8:2B:37:64:37:D5:03:AD:C9:0B
    rapid, Jan 6, 2009, trustedCertEntry,
    Certificate fingerprint (MD5): 64:9C:EF:2E:44:FC:C6:8F:52:07:D0:51:73:8F:CB:3
    QUESTION 1 : why the third party certificate's entry as "trustedCertEntry"? Is it always like this? Do I need to have only one certificate at a time? (If so, just remove the self signed and have 3rd party one)
    My Jetty server comes up but when I connect from Client Swing App, the "getServerCertificates()" method only returns one entry i.e self signed one but not the third party one.
    I am using like this
    URL url = new URL("https://127.0.0.1:port");
    HttpsURLConnection conn = (HttpsURLConnection) url.openConnection();
    conn.connect();
    Certificate[] certs = conn.getServerCertificates();
    Is not this API supposed to return all the server's certificate?
    Please guide me or instruct me what to do.
    Thanks,
    CRB

    Crossposted and answered.

Maybe you are looking for

  • Verizon billing for data overages that never happened?

    I just switched a few months ago from AT&T to Verizon.  Heard customer service and billing practices were better, and was willing to pay a bit more per month to get it.  Now, three months in ... I have a billing and customer service nightmare.  I hav

  • Using a static option with select dropdown

    I have a <select> dropdown menu in a Spry (master) region which controls the content in a Spry detail region. Both regions are based on the same dataset. When I select an option from the dropdown, additional details about the record are displayed in

  • How do I transfer music from my ipod to the family pc & my sisters ipod?

    My sister and I both have IPod touches and each have  some songs that the other one wants. Is there anyway I can transfer songs from my iPod to hers and from hers to mine? I'd also like to add the songs to the family computer. Thanks.

  • Installing java 1.4.1_02 in linux

    I tried installing java under Redhat 8.0 and I got my path variable set so it can find java and javac. now it gives me the following errors when I try to javac a file: Error: could not find libjava.so Error: could not find Java 2 Runtime Environment.

  • How to Deploy the Application

    Hello All. I have developed an application in WebDynPro ABAP. How to deploy the application. Warm regards, SampathKumar.