Developing Multiligual GUI

Basically designing a GUI we use .properties file in java to save the language resources.
But can it will be possible to save the language resource in the database instead of .properties file and show the GUI in different languages by getting value from the databse.

Sure. In fact, you could probably extend the Properties class to get the values from the database. That way the code that uses the properties wouldn't know the difference and wouldn't have to be changed.

Similar Messages

  • Develop Java GUI to interact with MS Access

    I am doing a Java course and got this assignment to develop a GUI application using MS Access to get data and to update information for an automated library system. I would realy like some help with integrating the GUI with Access. I started Java a few weeks ago from scratch and would appreciate all the help I could get. I really have fallen in love with Java and I think that it is a really great programming language to use. I really would love to become a Java expert some day.

    Take a look at the Java tutorials page. Theres a tutorial on "Creating a GUI Using JFC/Swing" and "JDBC Database Access":
    http://java.sun.com/docs/books/tutorial/

  • Developing swing GUI using XML

    hi
    I must develop a GUI using swing by parsing XML documents.How to render the swing objects at run time, after parsing the XML document.I must know the process of creating the swing containers,components from XML document. Some open sources are available for the purpose but i must create a framework for our own purpose, so must know the process involved.
    kindly provide me any links or tutorial for the same.
    with Regards,
    A.Rajesh

    hey thanks for the help...i saw these tools but my problem will not be solved by these as the diagram i need to generate from XML is a class diagram. The components of class diagram cannot be made using swings...eg arrow,rectangle,aggregation symbol etc....

  • Developing a GUI - Advice needed.

    I need to write a GUI for a Java application. I am currently using Forte for Java, which I like. I am assuming that if I buy JBuilder that it will be able to build a GUI fairly quickly. I don't know what Forte for Java offers as far as Rapid GUI development, as basically I have just started using the product.
    Basically my question is:
    Should I develop the GUI manually, or use a GUI builder?
    If I use JBuilder, I am afraid that I will basically be locked into using a particular vendor.
    Any advice is appreciated.

    Depending on experience I suggest writting it by hand. This will take time but you should get familiar with swing. Having said that. Before you go out to buy JBuider ( expensive ), I suggest you go and download netbeans. Its a free IDE with GUI builder. This is a Sun based product and again its free. www.netbeans.org.
    With this tool as with most java gui builders you can drop your own beans in. Both visible and invisible. So for example you have: MyTextbox extends JTextField you can add this to your component pallete. . meaning that you are able to drag and drop your own components into the frame.
    There are some rules that you should adhear to. . When editting the code in netbeans the necessary generated code is non-editable. You can edit it in another editor, but it may not load and display properly the next time you look at the class in the GUI editor../ . Imagine this to be the same with most editors. Anywho, I've said to much already. . .have fun with this one

  • Rapidness of Development of GUI Tools

    Hi,
    I need your help by judging about the development rapidness of this tools:
    - Forms
    - Apex
    - OA Framework
    - .NET
    This means I want that you give just one school mark (1/A = very good - 6/F = very bad). The point is how easy and quick it is to develop GUI applications for Oracle.
    Do I have to write a lot of code?
    Do I write everything new or is there a library with the most functions that are needed?
    Are big plans necessary about how I have to code s.th.?
    I need your help because I don't use any of the tools and want to make a comparison. At first I compare the speed so I need as much answers as possible to build an average or something like this.
    thx

    In every case, I'd give the tool a 'B'.
    Each tool has a different purpose, and answers a different development requirement and method. And the speed and amount of creating code often depends entirely on the effort you, the developer, make to learn to use the tool properly.
    Your question is like asking "Which tool is better: a hammer, an electric drill, a saw." and my answer is that "an electric drill is better for making smaller, controlled holes, whereas a hammer may be better for making rapid, real big, and uncontrolled holes."

  • How to develop a GUI in my game

    Hi,
    I'm working on a multiplayer game in Java 1.4. This is more like a prototype than a commercial quality game, and since the focus of my work is on the networking capabilities of the game, I want to spend the least possible time with mundane things like how to type information and select things on my game...in other words, having a GUI that can provide the game with a menu/submenus, buttons, textfields and the like.
    I've done several Swing applications before but this is different, since the event loop is provided by me (as any other game) and I'm using "active rendering" to display the graphics on screen.
    Does anyone knows how can I use the Swing (or AWT) components in my game?
    Thanks in advance.
    Gabriel

    Hi,
    Thanks for the ansewr. I've been doing an example and I could get my Swing dialog to appear in the screen.
    Below is thesource code of my example. It works but it seems to me that the animation of the square is flickering somehow (I think is double buffered) and the frame rate is somewhat low.
    I would like to know how to improve those things in the example so I could use it in my game.
    Regards,
    Gabriel
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import com.sun.j3d.utils.timer.*;
    public class ActiveSwingTest implements Runnable {
      static final int VEL = 1;
      // Number of frames with a delay of 0 ms before the animation thread yields
      // to other running threads.
      private static final int NO_DELAYS_PER_YIELD = 16;
      // no. of frames that can be skipped in any one animation loop
      // i.e the games state is updated but not rendered
      private static int MAX_FRAME_SKIPS = 5; // was 2;
      JFrame f;
      JPanel panel;
      Image backBuffer;
      JDialog dialog;
      private long gameStartTime;
      private long prevStatsTime;
      private boolean running;
      private Graphics2D graphics;
      private long period;
      private long framesSkipped = 0;
      int x = 0;
      int y = 0;
      int vx = VEL;
      int vy = VEL;
      public ActiveSwingTest() {
        initGraphics();
      public void initGraphics() {
        panel = new JPanel();
        panel.setPreferredSize(new Dimension(800, 600));
        panel.setFocusable(true);
        panel.requestFocus();
        panel.setIgnoreRepaint(true);
        readyForTermination();
        f = new JFrame();
        f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        f.getContentPane().add(panel);
        f.setIgnoreRepaint(true);
        f.setResizable(false);
        f.pack();
        backBuffer = createBackBuffer();
        if(backBuffer == null) {
          return;
        f.setVisible(true);
      public void run() {
        long timeDiff = 0;
        long overSleepTime = 0L;
        int noDelays = 0;
        long excess = 0L;
        gameStartTime = J3DTimer.getValue();
        prevStatsTime = gameStartTime;
        long beforeTime = gameStartTime;
        running = true;
        graphics = (Graphics2D) backBuffer.getGraphics();
        while(running) {
          update(timeDiff);
          render(graphics);
          paintScreen();
          long afterTime = J3DTimer.getValue();
          timeDiff = afterTime - beforeTime;
          long sleepTime = (period - timeDiff) - overSleepTime;
          if(sleepTime > 0) { // some time left in this cycle
            try {
              Thread.sleep(sleepTime / 1000000L); // nano -> ms
            catch(InterruptedException ex) {}
            overSleepTime = (J3DTimer.getValue() - afterTime) - sleepTime;
          else { // sleepTime <= 0; the frame took longer than the period
            excess -= sleepTime; // store excess time value
            overSleepTime = 0L;
            if(++noDelays >= NO_DELAYS_PER_YIELD) {
              Thread.yield(); // give another thread a chance to run
              noDelays = 0;
          beforeTime = J3DTimer.getValue();
          /* If frame animation is taking too long, update the game state
             without rendering it, to get the updates/sec nearer to
             the required FPS. */
          int skips = 0;
          while((excess > period) && (skips < MAX_FRAME_SKIPS)) {
            excess -= period;
            update(timeDiff); // update state but don't render
            skips++;
          framesSkipped += skips;
        System.exit(0); // so window disappears
      private void showDialogo() {
        if ( dialog == null ) {
          dialog = new JDialog(f, "Example dialog", true);
          final JTextField t = new JTextField("hello");
          JButton bok = new JButton("OK");
          bok.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                  System.out.println("text="+t.getText());
                  dialog.setVisible(false);
                  dialog.dispose();
                  dialog = null;
          JButton bcancel = new JButton("Cancel");
          bcancel.addActionListener(new ActionListener() {
                    public void actionPerformed(ActionEvent e) {
                      dialog.setVisible(false);
          final Container c = dialog.getContentPane();
          c.setLayout(new BorderLayout());
          c.add(t, BorderLayout.CENTER);
          final JPanel buttonPanel = new JPanel();
          buttonPanel.add(bok);
          buttonPanel.add(bcancel);
          c.add(buttonPanel, BorderLayout.PAGE_END);
          dialog.pack();
          dialog.setLocationRelativeTo(f);
          dialog.setVisible(true);
        else {
          dialog.setVisible(true);
      private void paintScreen() {
        // use active rendering to put the buffered image on-screen
        try {
          final Graphics g = panel.getGraphics();
          if(g != null) {
            g.drawImage(backBuffer, 0, 0, null);
          g.dispose();
        catch(Exception e) {
          System.out.println("Graphics context error: " + e);
      private Image createBackBuffer() {
        final Image dbImage = panel.createImage(800, 600);
        if(dbImage == null) {
          System.out.println("could not create the backbuffer image!");
        return dbImage;
      private void readyForTermination() {
        panel.addKeyListener(new KeyAdapter() {
          // listen for esc, q, end, ctrl-c on the canvas to
          // allow a convenient exit from the full screen configuration
          public void keyPressed(KeyEvent e) {
            int keyCode = e.getKeyCode();
            if((keyCode == KeyEvent.VK_ESCAPE) || (keyCode == KeyEvent.VK_Q) ||
               (keyCode == KeyEvent.VK_END) ||
               ((keyCode == KeyEvent.VK_C) && e.isControlDown())) {
              running = false;
            else if ( keyCode == KeyEvent.VK_D ) {
              showDialogo();
      private void update(long dt) {
        x += vx;
        y += vy;
        if ( x < 0 ) {
          x = 0;
          vx = VEL;
        else if ( x > 700 ) {
          x = 700;
          vx = -VEL;
        if ( y < 0 ) {
          y = 0;
          vy = VEL;
        else if ( y > 500 ) {
          y = 500;
          vy = -VEL;
      private void render(Graphics2D g) {
        g.setColor(Color.RED);
        g.fillRect(0, 0, 800, 600);
        g.setColor(Color.WHITE);
        g.fillRect(x, y, 100, 100);
      public static void main(String[] args) {
        ActiveSwingTest test = new ActiveSwingTest();
        new Thread(test).start();
    }

  • I would like to develope a GUI-Builder with Java. Any idea

    Hi!
    I would like to support GUI-Developers by writing a GUI-Builder with integrated design rules. For example selecting Platform dependent widgets, controlling the number of widgets on the form, proper positioning of widgets on the form etc.This should be a standalone application.
    Any one with tips, tricks, literature for architecture, tools to use etc?
    Thanks a million times.
    Marc

    Before start i would like you to visit www.netbeans.org
    Here you can find a very powerful IDE for Java as you are willing to create. If you like to procide creating then also you can find idea about that.

  • Which is the best and user freindly IDE for developing Java GUI application

    Please advice me if there is any good IDE for developing all kind of Java applications.
    I m confused about which IDE to use.
    I have Searched on Net also. and most of the answers i found was for JBuilder and JBoss.
    But cant confirm until u guys suggest me.
    Because i think this is the best place to ask questions about java.
    Please advice

    If you're developing JSPs and Servlets....
    I've found that using Eclipse (which is free) coupled with the MyEclipse plug-in (an advanced J2EE specific plug-in which costs $29.99USD/year) was the best for me. I've tried several free J2EE Eclipse plug-ins, didn't like them. Wasn't a big fan of NetBeans either, but I liked it tons better than the other Eclipse plug-ins.
    Therefore, IMHO for free I'd go with NetBeans, for a small fee I'd go with Eclipse/MyEclipse plug-in.
    If you are new to J2EE but not to Java, you may want to consider going straight to JSF and Sun's Java Studio Creator. This is not free, but the fee is one-time and development is (mostly) visual using Java Studio Creator.

  • Gui development tools

    im not exactly new to java, i have developed GUIs in the past . is there any good tools or software out there for rapid development of GUIs rather than writing code.
    Sincerely dotsy

    I think all gui creators suck.
    You still have to go into "their" code and try and figure it out.
    I have now created 3-4 very robust gui applications.
    I now have my own frame work that I work around.
    I can create complex guis within hours.
    It's that MVC thingy that made my View or Gui classes very portable.
    I think that is the best way, then you know your own code.
    and you can use it over and over again with different apps.

  • How to develop GUI/Form builder tool...?

    Hi,
    I am newbie to SWINGS. i've been a middle tier and backend developer in java.
    In one of my project i need to develop one GUI builder tool.
    Basically it contains menubar, palette to contain few components such as rectangle, table etc, and a space where we can design a gui by
    selecting the components from the palette.
    How can i start with this...?
    plz hlp me out....
    Thanks & Regards,
    Chandrakanth

    hi
    as you see i have post the same topic so if you know any
    information how to do such thing please inform me

  • NetBeans or Eclipse: Which is better for GUI development ?

    I am relatively new with JAVA, came from embedded software domain mostly in C.
    My interest is to learn and develop the GUI applications using Swing.
    I am currently in a process of evaluating the IDEs, Eclipse and NetBeans on Linux desktop environment (SuSE 10.3).
    My primary findings found that, NetBeans is better equipped with GUI development while Eclipse needs to have a plugin installed.
    For GUI development, I found that few of my fellow Java developer friends have mixed feelings about these two wonderful IDEs, in summary here are the comments:
    1) Developing GUI is better without any assistance from built in designers of IDEs (e.g. NetBeans or Visual Swing of Eclipse). Because, they put extra 'garbage" codes which are very much IDE specific.
    2) GUI development in NetBeans is faster and more productive than Eclipse
    3) Visual Swing for Eclipse is not a matured product and it is far inferior than NetBeans' capabaility
    Now I ask a question, what is the best practice to adopt for starting the GUI development ? NetBeans or Eclispse or IDE-less development ?
    Thanks.

    atomodachi wrote:
    Now I ask a question, what is the best practice to adopt for starting the GUI development ?
    NetBeansThis is my preference for IDE's. Please note that as I stated that is my preference. There isn't any best, some are clearly better than others for one reason or another, but once again, that boils down to personal preference.
    EclispseNot my preference.
    IDE-less development ?IMO: that is just silly. Unless you just enjoy tons of typing; why would you ever embark on doing something without a tool to speed up the process. Now that is not to say that in using your IDE you should start out by just dragging and dropping up a storm and merrily running down the road in ignorance until you hit a rough spot and have things dramatically pointed out that you've really not a clue about what is happening. Use the IDE, but learn how to do the manual processes along with it. That means that sometimes you'll not drag and drop to build your GUI, you'll actually code the entire thing. And you really should learn to do things command-line like compile. Do yourself a really big favor too, learn the debugger. The integrated debuggers is, perhaps, one of the best inventions in productivity tools that has as of yet been invented for developers.
    In any case, have fun... choose what you like, it really does come down to personal preference. I've worked in several shops over the years and most have come to the conclusion that if you can get the work done, and have projects that others can use, then to each their own preferences. The discussion rages on for and against each of the systems that you have mention--each have valid arguments--it boils down to what do you want and like.

  • Tool to develop GUI

    Hi,
    I would like to develop a GUI for my project. I heard that by making use of some tool like JCreator r NetBeans r Eclipse, we can simply drag n drop the required tools.
    I've downloaded NetBeans 5.5.1 recently. When I'm trying to run it, my system hangs up, as a result of that I was asked to restart the system. I'm using Windows VISTA .
    So, is there any tool around other than this NetBeans??

    YA, can anyone point out any good gui builder??
    im kinda confused..
    the main advantage of c# over java is a good gui builder..(for me at least)
    for c# theres many third party program that can build a gui as good as Visual c#..
    but why its difficult to find a good gui builder for java??

  • Java GUI development for UML

    Hi,
    I am developing a GUI for an application that allows users to draw workflows and manipulate them. The workflow diagram is similar to UML class diagrams where you can draw boxes and lines connecting them, moving them around using a mouse, editing their properties, etc. My experience in Java is quite limited. Can anyone tell me how to achieve this? Thanks a lot for your help.
    frank

    can you tell me about your experience of develop a tool for draw workflows.
    did you found any library to help you to create that???

  • What happened to GUI development in Sun Studio 12

    Sun Studio 11 had xdesigner more/less integrated with it so you could develop windows (gui) apps. I cannot find anything in SunStudio 12 to enable me to develop C++ gui apps. Even netbeans doesn't seem to be integrated with sunstudio and has to launched/run separately. Am I missing something? Can I no longer create/maintain xwindow apps when using sunstudio 12?

    The X-designer that shipped with Studio 11 was already quite old and out-of-date, so we stopped shipping it as of Studio 12. (It's hard to justify paying for new 3rd-party software to ship with a free product.) Design tools are available from various other sources.
    Current versions of Sun Studio require a special version of NetBeans -- you can't use the generic NB that you get from netbeans.org with the compilers and debugger. You can of course install the generic NB in addition to the one that comes with Sun Studio, and use it for other purposes. For example, on my system I installed the current NB in a directory parallel to the one used by Sun Studio.
    Future versions of Sun Studio will use a generic NetBeans, eliminating this particular inconvenience.

  • Running a GUI application without holding command prompt

    Hi there ,
    I have developed a GUI application using Swing. After compiling the same successfully , when I run the same , presently , I am running it like ,
    c:\> java xxx
    where c:\ is the general command prompt on a Windows machine where I can type in my commands like javac or java and xxx is the class file name . Now till I complete using my GUI application and exit from the same , the command prompt will also be there ( and probably displaying the output of my System.out.println ) . So , two sessions are running , one is just the command prompt and another is the actual GUI application.
    How can I avoide this ? e.g. when I type command "notepad" and press enter , notepad is started and the command prompt returns after starting notepad i.e. the notepad and the command prompt are not related now , I can close the command intrepreter and still notepad is running . What should I do to create such a Java GUI application ? Please advice .

    If I understand you correctly this is something that happens in linux also. And I believe that you can solve this by creating to shortcut to this program.
    And the shortcut or link to application will be the command line that you use to run the Java Application.
    i.e.
    java c:\javadir\subjavadir\application.class
    And I believe that this will allow it to run without the command prompt. Just showing the GUI and no additional command prompt window. Freeing the command prompt is something that I don't know how to do in either OS.
    I use the Link To Application method because I ultimately don't need to have multiple windows for one application. Even though it is nice to be able to kill the Application by destroying the command-prompt session (in case your app causes lock-ups during testing).
    Post your results . . . I'm not even sure that I'm being clear at all with my explanation to your question.

Maybe you are looking for

  • Can't get 10.47 on Nokia 2730

    Hi, I heard of some 10.47 update but I can't get it. It says no new software available. I am running 10.45. If anyone could reply that would be great. Solved! Go to Solution.

  • Different UoM for Condition Type in Pricing

    Hi All I have query My client does the Sales of Material in different UoM & also charges for Packing with Different UoM. Is it possible to maintian differnt UoM. For eg If I sale 1 qty for Rs. 100 I want ot charge for Packing Boxes which we will be 2

  • W540 + Ultra Dock on Linux

    I have a W540 and it is running Ubuntu Linux (still going ever since the BIOS update).  I want to get the docking station (the whole reason for buying a Lenovo) to have external keyboard mouse and monitor. I am interested in the Ultra Dock: http://sh

  • Upload doesn't Work

    i´m Building an online Folio. Everythings just worked fine - But suddenly the Upload doesn´t work anymore - as adding an article - the builder doesn´t upload the files anymore :-(

  • Where is the arrange windows icon now in Photoshop CS 6?

    Hi there, just installed the CS 6 of Photoshop on my Windows 7 PC. It seems, that the small icon for arranging like two or more open windows (files) have been disappeared in CS 6. I only can arrange them via the drop down "Windows" which I think is o