Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and beginning April 20th, 2021 (Eastern Time) the Yahoo Answers website will be in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.
Trending News
GUI and Graphics - how to learn to program?
I started in computers back in the 70's, but haven't kept up with the newer things, I am now trying to catch up. I have been mostly programming for working with data, now I want to learn how to do graphics in a Windows environment. I have tried some C++ and Java, only to hit roadblocks because I don't know how to find the right libraries / compilers.
I want to write a program that has a GUI driven window that reads data coordinates to draw special maps, then have the option to print or save the maps. I have done the map drawing in an old version of BASIC, but this can't read mouse coordinates and only has 16 colors..
Can someone please recommend a path that will teach me how to learn how to do this in a newer language? What product can I buy or files to download that has all the needed libraries, compilers etc to make the program work in WIN XP?
I am not near a university, the small local college has no answer for me. Such is small town Kansas.
Many thanks!
sudonym@yahoo.com
3 Answers
- 1 decade agoFavorite Answer
So many options, the most basic language for creating GUI's is a RAD (Rapid Application Development) language, such as Visual Basic or Delphi. I personally favour QT http://www.trolltech.com/ with C++, the GUI toolkit is very powerful and interoperable. Though if you're not friendly with C++, it might be a tad tricky to pick up.
For windows, you can use the Win32 API with most languages, I hate to suggest it, but if you're familiar with Basic, then I suggest picking up a copy of Visual Basic, http://msdn.microsoft.com/ should contain all you need to know.
- 1 decade ago
You can use C++ or Java for this. I personally would recommend Java for starting out. I think the way it's graphics work are much more intuitive, although C++ and MFC (graphics libraries) get used a whole lot more in the production world.
To get started doing a GUI app in java, download the NetBeans IDE with the JDK 5 bundle at http://java.sun.com/j2se/1.5.0/download-netbeans.h...
Netbeans has a GUI wizard you can use to make your app and then just flesh out the code if you like.
If you prefer to roll your own, the libraries you will need to use are the javax.swing.* classes.
Sun has very good tutorials on their site http://java.sun.com/docs/books/tutorial/uiswing/
I would recommend that you start by getting a JFrame on the screen. I would then probably use BorderLayout on the Container inside JFrame and add a JPanel in the center to draw on. You will need to override the paintComponent method to do your custom drawing. All this will make sense as you look at the tutorial...
From there you can create another custom JPanel on the in the Left portion of the screen where you can add your JTextFields and JButtons for data entry. You will then need to add some event handlers to your GUI so that you can submit data. Look at java.awt.event.ActionEvent for this.
Hope this Helps
- jacqualineLv 45 years ago
you will get into that in the time of Java via gaining knowledge of approximately Swing. Is your C++ seen C++ making use of seen Studio on abode windows? if so, create a sparkling abode windows type utility undertaking and you will see interior the toolbox quite a few photograph-appropriate aspects (like ImageBox) to start up gaining knowledge of with. there's a C++ for Mac making use of XCode, and using photos may be arranged in yet otherwise, yet all of this nevertheless boils right down to being waiting to create Jpeg or Gif (or lively Gif) that are utilized via the programming languages.