TEXT - Java Codes

Text Drawer

Description This code shows how to draw Text on your Frame along with the Font you like. Source Code import java.awt.Font; import java.awt.Graphics; import java.awt.Graphics2D; import java.awt.Renderi ...

0 Comments. 1527 views since Sep 3, 2008

Scroll Text

Description This code shows how to scroll or move a text on your window. Source Code import java.awt.Color; import java.awt.Dimension; import java.awt.FlowLayout; import java.awt.Font; import java.aw ...

0 Comments. 1037 views since Sep 10, 2008

Text Editor

Description This is a simple code to open a default editor to edit your text documents. Source Code import java.awt.Desktop; import java.io.File; import java.io.IOException; public class TextEditor ...

0 Comments. 1025 views since Aug 3, 2008

JTextPane: Change Text Properties

Description This is a code which describes some of the advantages of JTextPane Attributes. First select the Text and press the BNold Button and see the result. Source Code import java.awt.*; import jav ...

0 Comments. 1025 views since Aug 19, 2008

Anti Aliasing

Description This code is a simple example showing Anti Aliasing of an Image. Source Code import java.awt.event.WindowAdapter; import java.awt.event.WindowEvent; import java.awt.BasicStroke; import jav ...

0 Comments. 1007 views since Sep 3, 2008

Underlining a Text

Description This code shows how to Underline and how to Strike through a Text. Source Code import java.awt.Font; import java.awt.Graphics; import java.awt.Graphics2D; import java.awt.RenderingHints; ...

0 Comments. 978 views since Sep 4, 2008

Formatted TextField: InputVerification

Description This code implements Formatted TextField & calculates the EMI for the loan payment if provided with the inputs viz. loan amount, interest rate & time limit of the loan. Source Code import ...

1 Comments. 975 views since Oct 16, 2008

Transparent Text

Description This code shows how to draw a Transparent Text. Here in this example we have drawn a Text and then Coloured some of the portion Red. Source Code import java.awt.AlphaComposite; import java.a ...

0 Comments. 968 views since Sep 4, 2008

JFormattedTextField

Description This code is a demonstration of JFormattedTextField. Source Code import java.util.logging.Level; import java.util.logging.Logger; import javax.swing.BoxLayout; import javax.swing.JForma ...

0 Comments. 963 views since Oct 19, 2008

Advanced Text Hit

Description This code shows a String and on Clicking the Text tells the letter which you are Clicking on the Console. Source Code import java.awt.Font; import java.awt.Graphics; import java.awt.Graphic ...

0 Comments. 960 views since Sep 4, 2008

Formatted TextField: Combination Formatter

Description This is a code which demonstrates a Combination Formatter. It takes as input any number of hyphen-delimeted numbers & output an int array. Source Code import java.util.logging.Level; import ...

0 Comments. 950 views since Oct 19, 2008

Highlighting Text

Description This Code Highlights the Text on which you Drag the Mouse. Source Code import java.awt.Color; import java.awt.Font; import java.awt.Graphics; import java.awt.Graphics2D; import java.awt.R ...

0 Comments. 934 views since Sep 4, 2008

Copy Text

Description This is a code which can Copy Text from one Text Area to another Text Area. First select the text form left text area and then click the button and see the result. Source Code import java.a ...

0 Comments. 880 views since Aug 19, 2008

Formatted TextField: Storing a Phone Number

Description This code implements a Formatted TextField by storing the phone number & printingit onto the console. Source Code import java.awt.Color; import java.awt.Font; import java.awt.FontMetri ...

0 Comments. 871 views since Oct 16, 2008

JTextField & JPasswordField

Description This is a Code which demonstrates the JTextField class and JPasswordField. Source Code import java.awt.*; import java.awt.event.*; import javax.swing.*; public class Text_Password_Field exte ...

0 Comments. 839 views since Aug 19, 2008

Formatted TextField: Input Verifier

Description This code implements Formatted TextField & then displays the Input Verifier which further implements Plain JFormattedTextField, FTF with InputVerifier, & Plain JTextField. Source Code import ...

0 Comments. 829 views since Oct 18, 2008

Formatted TextField: Format Changer

Description This code demonstrates how to change the format in the Formatted TextField. Source Code import java.awt.BorderLayout; import java.awt.event.ActionEvent; import java.awt.event.ActionListen ...

0 Comments. 800 views since Oct 18, 2008