Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes Beginning Java and the fly likes help me out! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "help me out!" Watch "help me out!" New topic
Author

help me out!

Mitchell Kave
Ranch Hand

Joined: May 12, 2002
Posts: 70
i wanna to accept a string, and display it in a arial font,bold style and size of 30.
how can i do that?i have tried so many times already as i new in java.pls help....guide me through this.ok


-
Dirk Schreckmann
Sheriff

Joined: Dec 10, 2001
Posts: 7023
Mitchell,
We ain't got many rules 'round these parts, but we do got one. Please change your display name to comply with The JavaRanch Naming Policy.
Thanks Pardner!


[How To Ask Good Questions] [JavaRanch FAQ Wiki] [JavaRanch Radio]
Roy Ben Ami
Ranch Hand

Joined: Jan 13, 2002
Posts: 732
where do u want to display it?
a frame? an applet?
in a label?
Mitchell Kave
Ranch Hand

Joined: May 12, 2002
Posts: 70
hi,dirk
what do u wanna?i just wanna some help in it,what's wrong with my publicsy name? jst tell me,ok~ why i can't use my name?it's against the law or what!
Mitchell Kave
Ranch Hand

Joined: May 12, 2002
Posts: 70
hi,roy,
hi,i wanna to applet it in application,can i do it?but how? can u help me?
Jessica Sant
Sheriff

Joined: Oct 17, 2001
Posts: 4313

Mitchell-
The reason for our naming policy is to keep a professional air around the JavaRanch. You can find further discussion about the naming policy here. If you have any problems with it, you can discuss it there. If you don't feel comfortable using your real name, feel free to use a fake name -- just don't make it 'obviously fictitious' like "Bill Clinton" or "Ben Dover"
Pradyumna Hari
Greenhorn

Joined: May 27, 2002
Posts: 15
Hi Mitchell,
Here is the code that shows how you can use your font to display. This is an applet.
Applet Code

HTML File Code

Mitchell Kave
Ranch Hand

Joined: May 12, 2002
Posts: 70
hi pradyumna hari,
anyway,thanks for urs help,it's working correctly.
what i want is in a application?its will accept a string and change size and sytle of it.
is it possible to do that?
Mitchell Kave
Ranch Hand

Joined: May 12, 2002
Posts: 70
hi,prad hari,
i can't do it in application.for me,it seems to difficult for the first time.do u know how to do it?the code u gave me is correct but i want it in application that i can accept a string. anything from the string, "hello world or "other thing". on the way accepting it,it will changed to arial font,bold style and size of 30.
i have tried so many times already,
thanks for helping.
Dirk Schreckmann
Sheriff

Joined: Dec 10, 2001
Posts: 7023
Mitchell,
I like your display name.
Here's a basic outline for an application that does what you're trying to do. Note that nothing really different than what Pradyumna demonstrated is used:

Catching on?
Good Luck.
Mitchell Kave
Ranch Hand

Joined: May 12, 2002
Posts: 70
hi,dirk
thanks for it
i think i know how to make it done? but,one more thing,how to count each character that i have enter in a each? let say i have type "Hello".
it should have a function to calculate the character, As for "hello" 4 character.
how to do this one?i just doing my learning in java right now,need a lot help from here.
thanks!
Jamie Robertson
Ranch Hand

Joined: Jul 09, 2001
Posts: 1879

here is a link to the java documentation. As a beginner you will soon realize that it is your best friend. How to find all the methods associated with the String class:
on the top left frame of the web page ( link provided above ), find the Package name that the String class belongs to --> java.lang. On the bottom left, the link to the String class should now be in the list of classes. Click on it and look under the method summary. The method you are looking for is there.
Jamie
Dirk Schreckmann
Sheriff

Joined: Dec 10, 2001
Posts: 7023
Big hint: it's the length method.
Mitchell Kave
Ranch Hand

Joined: May 12, 2002
Posts: 70
hei,dirk
i cannot find any length method to do with my question,can u help me with the length method?
plss....dirk
Dirk Schreckmann
Sheriff

Joined: Dec 10, 2001
Posts: 7023
Mitchell,
Take a look at the links to the API documentation as Jamie has suggested and you will discover that String::length() can be used to determine the number of characters in a String.
For example, given some String called whatever, to determine how many characters are in whatever, your program might include this:Making sense?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: help me out!
 
Similar Threads
h:selectManyCheckbox inside h:dataTable
How to set values from script element as attribute's using EL or JSTL ????
Spring Web Project
Add and Edit a row
submit form problem