Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The first function is to write code using the Java language that does the following: The user enters some text in his dialog box, and

The first function is to write code using the Java language that does the following: The user enters some text in his dialog box, and it gives the result the number of small characters in the entered text and displays it in a dialog box as well.

it's mean like the word( Khalid ) there is 4 small letters and one capital letters only print it not count it

in short our proffessor want a program that's only Count the small letters in any words and the capital letters in this word print it like (K) from khalid and (4) for the small letters and thank you

image text in transcribed

this is my code I hope you understand me

package jtextbox; import javax.swing.*; import java.awt.event. *; public class JJ { public static void main(String] args) { JFrame f = new JFrame ("hi !"); JButton b = new JButton("press"); JTextField tf = new JTextField(); JTextField tf1 = new JTextField(); b.setBounds(125, 210, 100, 50); tf.setBounds(25, 100, 100, 25); tf1.setBounds(225, 100, 100, 25); f.setSize(400, 400); f.add(b); f.add(tf); f.add(tf1); f.setLayout(null); f.setVisible(true); f.setIconlmage(null); b.addActionListener((ActionEvent e )->{ String str1 = tf.getText(); int LowerCase = 0; for(int i=0;i

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Object Oriented Databases Prentice Hall International Series In Computer Science

Authors: John G. Hughes

1st Edition

0136298745, 978-0136298748

More Books

Students also viewed these Databases questions

Question

3. List ways to manage relationship dynamics

Answered: 1 week ago