GUI

how to add digital time in GUI?

hi,

There have any simple code that show the current digital time or date of PC in GUI?
Suppose, if i create a Label in a corner of GUI to show time as same as PC-BIOS time.

Is it possible ???

Joya Silva.

how to save output to a particular Folder as txt file ?

hi,
i m facing a small prob in GUI, need to save my output to a particular folder.

below this code showing the square of any integer in TextField named: "resultField". i've a button "save" that need to save the result from that TextField, suppose in my "c:\Repository " folder as a txt file.

In addition, the name of the txt file can be same as given input integer. Example: 77, 99, .. whatever the input integer.

how can i do this ?? pls help...

JOYA SILVA.

CODE:
import java.awt.*;
import java.awt.event.*;

public class SaveData extends Frame implements ActionListener {

Java Queue printing to TextField

Hi I am relatively new to Java, I have a queue, everything works, this is not my code but now I want to get the code to display in the TextFields in my gui.

The queue displays the alphabet (26 char's), firstly do I need to convert the char to String?

Here is my code

 /*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package bqueue;

import java.awt.*;
import javax.swing.*;
import java.io.*;

/**
 *
 * @author david
 *
 */

public class clAQueue {
private char q[]; // this array holds the queue

Java: Full Code Listing - The Robot class Demo - How to move the mouse cursor and type keys automatically from your Java program?

A full Java code listing of the Robot class demo - This program demonstrates the core features offered by the Robot class like mouse movement, keyboard actions etc. Contains snapshots of the output of this program as well.

Custom progress / wait dialog in Java

hi,

I want to show a progress/wait dialog in my Java application. For example a dialog where an arrow moves from left to right when a background operation in progress.

Any pointers or code will be really appreciated.

Thanks,

Brian

How to display XML source in a text area view with syntax color highlighting in Java?

This article will take you through how one can display an XML document or file contents as a source view with syntax color highlighting in a Java program. There are some open source products available to solve this purpose. This article will focus on one particular open source product that is new and sounds promising.

How to use Tooltips in Java?

This article will take you through how to create and use Tooltip texts for a component in a Java program. A tooltip is a component that appears as a yellow box of text when the mouse is hovered over a particular component. In this article, you will see how a tooltip can be created for each component in Java - JButton, JLabel, JRadioButton etc with detailed code and snapshots for clear understanding.

Java: The Robot class - How to move the mouse cursor and type keys automatically from your Java program?

Want to simulate the various actions that the user can perform with a mouse like mouse pressed, mouse released etc.? or simulate various keyboard actions like key pressed, key released etc.? The Java class - java.awt.Robot is your answer. Read further to see a full demo of the various features this class has to offer.

Syndicate content
GUI | Our website now yours! - Currenlty Java focussed.

GUI

how to add digital time in GUI?

hi,

There have any simple code that show the current digital time or date of PC in GUI?
Suppose, if i create a Label in a corner of GUI to show time as same as PC-BIOS time.

Is it possible ???

Joya Silva.

how to save output to a particular Folder as txt file ?

hi,
i m facing a small prob in GUI, need to save my output to a particular folder.

below this code showing the square of any integer in TextField named: "resultField". i've a button "save" that need to save the result from that TextField, suppose in my "c:\Repository " folder as a txt file.

In addition, the name of the txt file can be same as given input integer. Example: 77, 99, .. whatever the input integer.

how can i do this ?? pls help...

JOYA SILVA.

CODE:
import java.awt.*;
import java.awt.event.*;

public class SaveData extends Frame implements ActionListener {

Java Queue printing to TextField

Hi I am relatively new to Java, I have a queue, everything works, this is not my code but now I want to get the code to display in the TextFields in my gui.

The queue displays the alphabet (26 char's), firstly do I need to convert the char to String?

Here is my code

 /*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package bqueue;

import java.awt.*;
import javax.swing.*;
import java.io.*;

/**
 *
 * @author david
 *
 */

public class clAQueue {
private char q[]; // this array holds the queue

Java: Full Code Listing - The Robot class Demo - How to move the mouse cursor and type keys automatically from your Java program?

A full Java code listing of the Robot class demo - This program demonstrates the core features offered by the Robot class like mouse movement, keyboard actions etc. Contains snapshots of the output of this program as well.

Custom progress / wait dialog in Java

hi,

I want to show a progress/wait dialog in my Java application. For example a dialog where an arrow moves from left to right when a background operation in progress.

Any pointers or code will be really appreciated.

Thanks,

Brian

How to display XML source in a text area view with syntax color highlighting in Java?

This article will take you through how one can display an XML document or file contents as a source view with syntax color highlighting in a Java program. There are some open source products available to solve this purpose. This article will focus on one particular open source product that is new and sounds promising.

How to use Tooltips in Java?

This article will take you through how to create and use Tooltip texts for a component in a Java program. A tooltip is a component that appears as a yellow box of text when the mouse is hovered over a particular component. In this article, you will see how a tooltip can be created for each component in Java - JButton, JLabel, JRadioButton etc with detailed code and snapshots for clear understanding.

Java: The Robot class - How to move the mouse cursor and type keys automatically from your Java program?

Want to simulate the various actions that the user can perform with a mouse like mouse pressed, mouse released etc.? or simulate various keyboard actions like key pressed, key released etc.? The Java class - java.awt.Robot is your answer. Read further to see a full demo of the various features this class has to offer.

Syndicate content