Tag: Windows

  • Creating a Windows application in Java using Eclipse

    Step 1: Create a new Java Application

    In Eclipse select File > New > Java Project:

    Step 2: Create a new Frame

    In Eclipse, right click the ‘src’ folder and select New > Other.

    In the wizard dialog that appears select WindowBuilder > Swing Designer > JFrame:

    Click Next. Give your JFrame a name:

    Click Finish.

    Note how the following code for gui.java gets generated:

    import java.awt.BorderLayout;
    
    public class gui extends JFrame {
    
    	private JPanel contentPane;
    
    	/**
    	 * Launch the application.
    	 */
    	public static void main(String[] args) {
    		EventQueue.invokeLater(new Runnable() {
    			public void run() {
    				try {
    					gui frame = new gui();
    					frame.setVisible(true);
    				} catch (Exception e) {
    					e.printStackTrace();
    				}
    			}
    		});
    	}
    
    	/**
    	 * Create the frame.
    	 */
    	public gui() {
    		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    		setBounds(100, 100, 450, 300);
    		contentPane = new JPanel();
    		contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
    		contentPane.setLayout(new BorderLayout(0, 0));
    		setContentPane(contentPane);
    	}
    
    }
    

    Step 3: Build and fix compiler warnings

    Note also when building the project we get the one warning:

    “The serializable class gui does not declare a static final serialVersionUID field of type long gui.java /WindowsApp/src line 9 Java Problem”

    Click your mouse pointer over by the warning symbol and allow Eclipse to correct it:

    On building and running the project we have our bare minimum Windows application as shown:

  • Windows programming using MinGW

    A short example of how to started with Windows programming in non-Visual Studio environments.

    In this example, we use the MinGW (Minimalist GNU for Windows) compiler within the Code::Blocks integrated development environment.

    MinGW can be obtained via the following link:

    http://www.mingw.org/

    First select File > New > Project… and opt to create a new empty project:
    (more…)

  • Getting started with Windows GDI graphics applications in C++

    A guide to getting started with Windows graphics applications for the very first time. The Windows Graphics Device Interface (GDI) forms the basis of drawing lines and objects, and from this device contexts. I will not go into any detail about these concepts in this post. I just want to show a simple means of getting started with things like the drawing of lines and objects in Windows applications. There is nothing stopping you from reading further on the subject to increase your understanding.
    (more…)

  • Problems Accessing Linux Folders and Servers from Windows

    A short posting on dealing with accessing shared directories from remote Windows machines. When trying to access a shared folder stored on a Linux server from (say) a remote Windows XP machine you may have come across the following error message in much the same way as I did:
    (more…)

  • Getting Started with FFMPEG for Windows

    Some pointers on how to get ffmpeg installed for use in Windows environments.
    (more…)

  • Getting Started with NVIDIA CUDA for Windows

    Introduction

    CUDA is NVIDIA’s parallel computing architecture that can greatly ehance your computer’s performance by harnessing the power of your GPU (graphics processing unit), as opposed to your PC’s CPU (central processing unit). For a general overview, your best bet may be to go straight to their Getting Started guide.
    (more…)

  • General Windows How-Tos…

    Starting from today, any useful Windows-related tips I encounter. I anticpate this post will grow as and when I come across any other Windows-related stuff… First off: (more…)

  • Using TrueCrypt to Password Protect Windows Folders

    The Windows method

    Windows can help you protect your folders in so much that only selected users (such as you) can see its contents. You can place restrictions on who can do what with folders, by right-clicking the folder, selecting properties, clicking the security tab and mofifying the contents. (more…)

  • Using FLTK in Visual Studio

    Note: for configuring FLTK in Linux environments, please refer to this post.

    1. Download and extract FLTK

    For this particular install I used an old Visual Studio 2003 .NET version. Get the zipped file from the download section of Bill Spitzak’s FLTK site. Unzip the file and place it somewhere suitable such as C:\fltk-1.1.10-source. (more…)

  • Getting Started with OpenGL for Windows

    For setting up OpenGL in Ubuntu Linux, please see this post, otherwise for Windows / Visual Studio environments, please use these following instructions:

    1. Download the latest Windows drivers

    As stated on the OpenGLs wiki page, OpenGL more or less comes with the Windows operating system. You will need to ensure your PC has the latest drivers for your graphics hardware, however. Without these drivers, you will probably default to the software version of OpenGL 1.1 which is considerably slower. (more…)