Java Swing/AWT and FX is so old school! Give me HTML and CSS for GUI!

Dear Java,
I am a seasoned programmer and I feel it's time JAVA implements a GUI system where it uses HTML and CSS for the GUI. For the love of god just look at the interfaces you can make using HTML and CSS alone. I am a big fan of Java Swing and the recent GUI designer for FX is quite cool. But they are just not as simple as HTML and CSS. And JavaFX has some interesting requirements for the graphics.
I know it is possible to use JavaFX and implement the WebView/WebDriver and make it load a HTML page, etc... but why go through all the trouble?
Just imagine... if you make Java where it has powerful back-end to do what it does best and the HTML/CSS powered GUI on the front-end. It will make the lives of many developers much much easier.
I am not sure whether a Swing designed GUI will be faster than a HTML designed GUI... but if you look at a traditional browser and how fast it renders HTML/CSS, I am sure if Java had a native Form where it uses HTML and CSS to render the GUI, Java will make the dreams of many programmers a reality.
Make it happen!!!!

Check this i solve problem just now using this
https://wiki.archlinux.org/index.php/Ja … ow_Manager

Similar Messages

  • Im only starting and cant work out how to give a black and white photo blue eyes

    im a beginer and cant figer out how to give a black and white portrat photo blue eyes

    - If the original is B&W first change the picture's mode to color. In my PSE version with is done by Image > Mode > RGB Color. 
    - Add a blank layer and set it's Blend Mode to Overlay or Color.
    - Activate the Brush tool, choose a dark blue color, and paint the eyes. If the result is too dark lower the layer's Opacity. Use the Eraser to remove excess color around the eyes.

  • I have been downloading mountain lion to my Mac computer for over 4 hours and it is only about 2/3 of the way through and seems to be stuck.  What can I do?     It is an I mac and only 2 years old with 8 GB memory and has OSX 10.6.8 on it.  I did update a

    I have been downloading Mountain Lion for MAC for over 4 hrs. and it seems to be stuck about 2/3 of the way through.  I have a I mac that is only 2 yrs old has 8 GB memory and I updated all software, checked utilitie for any disc repairs andbacked up everything before I started this process.  Can someone tell me what to do  Right now the version is OSX 10.6.8.

    Let it go... these DL's take forever, depending on the spped of your connection and the traffic on the servers.
    If by morning it is still sitting there restart and the DL should pick up from where it left off.

  • Help! how can I update JDK from 1.3 to 1.4 for Java Swing correctly?

    Urgent! currently I meet one trouble for GUI display, which is developed by Java Swing when I update my JDK1.3 to 1.4. I use JRun as web server and all of the GUI Java Swing code developed based on JDK 1.3 and before I update, all of the GUI display is correct and there are no problem, but after I update to JDK 1.4, I always meet this kind of problem "java.lang NoClassDefFoundError" which is displaye on Java Console and "Exception:java.lang.NullPintException" is displayed on GUI. Sometimes, I need to try two times to display GUI(Jave Swing), then it can work. Could you give me a fever and show me how to fix this problems? which kind of change in JDK Java Swing package?
    Thank you much.
    Steven

    I have recompiled app. by JDK1.4 and I also changed classpath but I can not fix the problem. The strange thing is that I can view the The same GUI(Java Swing) which is installed in another computer using the same JRUN too, but in local computer I can not view the GUI. Do you have some other suggestions? Why Can I view the same GUI instaaled in another computer?
    Very Thanks
    Steven

  • Upgrade Java Swing Project

    Hi Everyone,
    I am looking forward for some guidance from all you guys here.
    I have been assigned the work of upgrading Java Swing project. The upgrading also involved some improvements in look and feel of the tool.
    Currently the tool looks very simple/basic and needs some good over-haul.
    As basically I am a J2EE guy, I dont have much idea about the Swing Open-source API's that I can utilize for the same.
    If anyone has good idea about the API's that can be utilized or suggestions for the improvement of the tool look wise then please let me know.
    Thanks,
    Gaurav

    user7668872 wrote:
    ..I have done some research and I have come across.. That is an interesting term to describe the 2 PLAFs I mentioned on this very thread. O_o
    ..some themes like metal(being used currently), Windows and nimbus.
    I implemented all these themes one by one in the project, but not sure if I can use any of these themes and extend them in some ways to look like the mock-up.
    The Synth Look and Feel.
    "Creating a custom look and feel, or modifying an existing one, can be a daunting task. The <a href="http://download.oracle.com/javase/7/docs/api/javax/swing/plaf/synth/package-summary.html">javax.swing.plaf.synth</a> package can be used to create a custom look and feel with much less effort. You can create a Synth look and feel either programatically or through the use of an external XML file. The discussion below is devoted to the creation of a Synth look and feel using an external XML file. Creating a Synth L&F programatically is discussed in the API documentation."
    There are also a number of existing custom PLAFs. E.G. See this excellent summary at SO on the thread Look and feel in java.
    What will you suggest me :)<ul>
    <li>When in doubt, try it.
    <li>Be good to your mum.
    </ul>

  • I have transferred my itunes library to an external drive. I then attached the external disk to a new computer. I can now access all songs from the new computer. But I can't access playlists. I can still  access all songs and playlists on the old computer

    I have transferred my itunes library to an external drive. I then attached the external disk to a new computer. I can now access all songs from the new computer. But I can't access playlists. I can still  access all songs and playlists on the old computer

    If you right mouse and select Get info it will show you the Apple ID used to purchase these songs.
    Usually the name of an apple id is based on the email. So knowing that you may have forgotten the Apple ID password.
    You can request a new password here http://www.apple.com/support/appleid/

  • Moving iTunes and iPhone from an old PC to a new MacBook Pro

    Hi, I am having some real problems. I have recently bought a new Macbook Pro to replace my old Windows PC. I am having no trouble moving all of documents and music from the old PC however I am completely stuck for what to do in transferring my iTunes and iPhone 4 content AND information onto the new itunes. I have consolidated the music files on the old pc but havent copied anything yet.
    What I am looking to do is to be able to sync the iPhone to the new Mac without any of the information on the iphone being erased. Is this possible without having to pay for third party software? I have a WiFi network which both of the computers are connected to. I am also able to use an external harddrive.
    I have already transferred the purchases from my account onto the new mac but a lot off my music isnt from the itunes store but is from various CD's.
    I am really lost on what to do and I am even considering writing down all my contacts, lol. However, i do have all of my current iPhone info such as contacts and calender sync'd with iCloud if this helps.
    Many thanks in advance,
    Matt

    matty_234 wrote:
    Will this enable me to plug my iPhone in without any changes or reformatting? ...
    If you follow all the Steps in the Link it should...
    matty_234 wrote:
    .... Also, I guess this will overwrite the purchases already on my mac? ...
    You can redownload them for free...   http://support.apple.com/kb/HT2519
    matty_234 wrote:
    ... One last thing, does this include the iphone backups?...
    Everything that is in iTunes should be there...

  • Problem with Premiere Pro and Old School X3100

    Hi everyone,
    Got a problem here and really looking for help .  I know the intel 965 or X3100 chipset/GPU (in a Dell inspiron 1720 running Win 7 64 bit) is way old school, but as we're waiting for a couple of i7/i5 laptop upgrades, this is what I have to resort to for some minor mobile SD editing (nothing extreme but 15-30s short commercials). With the current Intel driver (8.15.10.1930), the preview monitors (source and sequence) do not work.  They're simply a blank frame (even after I render the sequence).  It seems to be the Intel drivers whooping my butt as there is no problems with the standard W7 WDDM 1.1 display driver, except the computer isn't stable with freezes on wake (and no OpenGL support in PS... which isn't a big deal).  I've also tried Vista 64 drivers in compatibility mode with no luck.
    The rest of the CS4 suite works great.  It is not the trial version and I've tried PP 4.0, 4.01, 4.1, 4.2, 4.2.1 (suggested by another post), and reinstallation.  I've also tried changing settings in the Intel drivers and... even modded 965 drivers.
    I know the X3100 is quite common (maybe not among PP users...) so any experience you might have would be awesome.  Maybe an older Intel driver?  If you can help me, I'll name my laptop after you!  ...unless you realize that could actually be an insult   Thanks!

    This hardware sub-forum is a good place to read about what will run CS5
    While HD editing (which I won't do) will require a RAID for data, what I am going to build for SD editing with CS5 and Win7 64bit is listed near the top of my notes page http://www.pacifier.com/~jtsmith/ADOBE.HTM
    If you are adept with tools... build your own and save $$

  • HT1414 I updated to new ios and i accidently hit the restore button and now i have old pictures and text messages on my phone is there anyway to get my info back on my phone that i had before the update?

    I was updating to the current iso6 and forgot to click new phone in I-tunes when updating instead i clicked restore and now I have old info on my phone and all my current info is gone is there any way to get that info back.

    Setting up as "new" will set the device as if it were just taken out of the box.  This certainly would not restore any content that was on the device.
    Sounds like what you want is to simply restore to a more recent backup.  You did backup the device prior to updating correct?  If you did not, it's unlikely that you can get the content back.

  • Can't select text when export in HTML and Images

    I am entirely new to Fireworks and I can't find anyone to teach me Adobe Fireworks. I followed some youtube tutorials but most of them are vague. I am still figuring the way to export from Fireworks to Dreamweaver, without affecting its contents like bitmap images and the text. When I export in HTML and Images format and opened the htm file, I can't select the text I've inserted in Fireworks. Can anyone tell me what I should do?

    I cant scroll below or above viewable section of text in any of my Macbooks, iMac, Mac Mini. Never have been able to, never could, except by pressing the arrow keys whilst selecting, to move up or down.
    Its stupid
    I dont have flash installed (never will do since my first virus of video ad sound running in background from Cnet was downloaded and kept returning until i deinstalled flash).
    I believe that this is a universal issue because none of my Macs can scroll out of screen when selecting text, which as a webmaster and developer, is a pain in the butt
    My issue is not in word documents, its in everything

  • HTML and Flash

    i have been searching for help on this issue and cant seem to find an answer.  i am sure the issue is my lack of understanding.
    Basically, i have a flash (CS3) program (lobby.fla) that contains a button to load another flash file (join.swf).  i published the
    lobby.fla program and created the lobby.html program and the AC_RunActiveContent.js.  All program files are in the same directory.
    if i run lobby.fla from Flash CS3 all works as i would expect.  when i click on the join button, the join.swf is loaded.
    if i run the lobby.html program from Dreamweaver,  the join button does nothing (not even a trace statement is excuted).
    Eventually I would like to pass parameters from the lobby program to the join program but i cant get the button to work.
    if i just load the htl program in the browser this works.  but when i run the lobby.html program from within dreamweaver the botton does
    nothing.  what am i missing in the dreamweaver side of this?
    my environment is Windows XP Home, php-mysql, Dreamweaver and Flash CS3.
    thanks for any help
    teremoto

    at this stage i would take a guess.  i am at a loss.
    from my understanding i have published the lobby.fla and i have gotten a lobby.swf, lobby.html and an AC_RunActiveContent.js files.
    i have looked at the lobby.html and it seems to match with what i can find on the web searching forums for help and examples.
    so i dont think it is that but it may be i need to add something but i am not sure.  the AC_RunActiveContent.js file seems to be rather generic and
    it does not look like something i should or would modify.
    why would this work fine if i run this program outside of dreamweaver?
    i thought it would be best to use html-ajax-php-mysql to handle logins and then let flash be the main program that the user will use.
    maybe i am wrong in my design thinking.  What i am trying to accomplish is to have a page presented (with links to join specific rooms).
    the rooms will be a flash program (there is no required interaction between users who join the room...but i will need to pass a few pieces of
    data back to the main calling program where i will need to update my database).
    should my design be more where all links/buttons needed to move the user to the flash programs i want them to interact with be done outside
    of flash?  i was hoping to use flash to just pass the required parameters back to the lobby.html program and then process that data (update
    my databases) .  it just seemed easier to have a main driver program (my lobby flash program) to handle all the work as opposed to a whole bunch
    of html pages.
    i appreciate your opinion on this....i feel i maybe moving in the wrong direction in my development.
    thanks
    teremoto

  • 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.

  • 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

  • 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.

  • 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

Maybe you are looking for