Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa Swing-AWT Can iadd StringTokenizer into JLabel componenet
Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


raja
Can iadd StringTokenizer into JLabel componenet
1 Answer(s)      4 years and a month ago
Posted in : Swing AWT


l24="india.cricket.java.dotnet.oracle" String mn=l24; StringTokenizer mn1=new StringTokenizer(l24,". "); String mn3=(String)mn1; nowon=new JLabel(mn3);//label nowon.setBounds(3,280,1580,600); nowon.setBackground(Color.cyan);

sir i want to add StringTokenizer element in JLabel component is it possible. Output should be like this india cricket java dotnet oracle


Advertisement
View Answers

December 7, 2010 at 5:10 PM


Hi Friend,

You can also use replace() method of String class.

String st="india.cricket.java.dotnet.oracle";
String str=st.replace("."," ");

It will also be helpful for you.

Thanks



Related Tutorials/Questions & Answers:
Can iadd StringTokenizer into JLabel componenet
Can iadd StringTokenizer into JLabel componenet  l24="india.cricket.java.dotnet.oracle" String mn=l24; StringTokenizer mn1=new StringTokenizer(l24,". "); String mn3=(String)mn1; nowon=new JLabel(mn3);//label nowon.setBounds
JLabel
JLabel  how to give dimensions to JLabel
Advertisements
Query on StringTokenizer
Query on StringTokenizer   Sir,I kept my some data in backend using... it in a String .i want to add this String in JLabel like this JLabel o=new JLabel(st); My...(); f.setLayout(null); JLabel l=new JLabel(str); l.setBounds
Java stringtokenizer
Java stringtokenizer  What is difference between string and stringtokenizer
program using StringTokenizer
program using StringTokenizer  I want to know about StringTokenizer,so can you please explain it with an example
Problems in Stringtokenizer
node[]; StringTokenizer str,str1; Input() throws Exception { FileReader df=new FileReader("Input.txt"); Scanner fr=new Scanner(df); str=new StringTokenizer... StringTokenizer(fr.nextLine(),"$"); System.out.println("rtryutrty"+n+vn); for(int i
Problems in Stringtokenizer
node[]; StringTokenizer str,str1; Input() throws Exception { FileReader df=new FileReader("Input.txt"); Scanner fr=new Scanner(df); str=new StringTokenizer... StringTokenizer(fr.nextLine(),"$"); System.out.println("rtryutrty"+n+vn); for(int i
Problems in Stringtokenizer
node[]; StringTokenizer str,str1; Input() throws Exception { FileReader df=new FileReader("Input.txt"); Scanner fr=new Scanner(df); str=new StringTokenizer... StringTokenizer(fr.nextLine(),"$"); System.out.println("rtryutrty"+n+vn); for(int i
JLabel class - Java Beginners
JLabel class  what are the superclasses of the JLabel class? Thanks taylordk@nationwide.com  Hi Friend, JComponent class... of JLabel class. Thanks
StringTokenizer not returning proper result
StringTokenizer not returning proper result  I have this code... System.out.print("Enter the stack integers side by side with a space in between: "); StringTokenizer st=new StringTokenizer(br.readLine()); int a[]=new int[9000
Changing JLabel with a jcombobox - Java Beginners
Changing JLabel with a jcombobox  Hi, I have a JLabel which should change when i select an item from JCombobox.I have some calculations after i get a value from the combo,the result of which i have to display using a JLabel I
Java StringTokenizer
Java StringTokenizer In this tutorial we will discuss about String Tokenizer... string into token,  first create a object of the StringTokenizer class, pass the string and the delimited string you want. StringTokenizer str = new
Breaking a string into words without using StringTokenizer
Breaking a string into words without using StringTokenizer  how can we Break a string into words without using StringTokenizer ??   The given code convert the string into words. import java.util.*; class StringExample
How to create Runtime time jLabel in java swing ?
How to create Runtime time jLabel in java swing ?   hi sir. my problem is that i want to display database row on a jLabel. Suppose i retrived a table from database & i want to display its row value on jLabel. i m facing
how to use stringtokenizer on table? and display in table format.
display result in row format  how to use stringtokenizer on table? and display in table format
how to use stringtokenizer on table? and display in table format.
how to use stringtokenizer on table? and display in table format.  table is retrieved from mysql database and each row contains data like(java,c,c++,.net
How to change backgroundcolor and foreground color of JLabel in Java - Java Beginners
How to change backgroundcolor and foreground color of JLabel in Java  How to change backgroundcolor and foreground color of JLabel in Java  ...*; class DisplayData{ JLabel lab; JTextField text; JButton button; JPanel p
how to use StringTokenizer to retrieve the class name, attributes name and methods name from the Java Source Code
how to use StringTokenizer to retrieve the class name, attributes name... it can read a Java file and then tokenize them into tokens. However, I am facing... only from the source code. Can anyone help me to solve it? Below are my portion
plz anyone can solve my
plz anyone can solve my  creat an applet prog which accepts...; JLabel label1,label2,label3; JTextField text1,text2,text3; SwingExample(){ setLayout(null); label1 = new JLabel(); label1.setText("Name:"); text1 = new
can modify this application connection with database
can modify this application connection with database   hi i'm want... to Java Frame, in here can i ask one more question about using this application...{ JTextField text,text1,text2,text3,text4,text5,text6,text7; JLabel
Can a class be declared as static?
Can a class be declared as static?  Hi, Can a class be declared as static? thanks
it can be submitted by hitting ENTER
it can be submitted by hitting ENTER  How do I make a form so it can be submitted by hitting ENTER
Can a class be declared as protected?
Can a class be declared as protected?  Hi, Can a class be declared as protected? thanks   Hi, A class can't be declared as protected. only methods can be declared as protected. http://www.roseindia.net/java
Can ArrayList accept an ImageIcon >>????
Can ArrayList accept an ImageIcon >>????  haw can create ArrayList witch can accept Image ..mean when i use add() method, instead item let me add image to the ArrayList in run time .{should be the program using GUI
can Stack accept imageIcon ..??
can Stack accept imageIcon ..??  how can write program like album ..by using Stack as an ideas datastracture and using imageIconb ?? please help me ..thanks alot
Can a main method be overloaded?
Can a main method be overloaded?   Hi, Can a main method be overloaded? thanks,   Hi, Yes, In Java program we could having multiple number of main() methods with different Signature and implementation in the class
Can I pass a
Can I pass a   Suppose I have servlet named Name.java and there is a variable String name holding a value "Roseindia". I have collected the value to Getname.jsp via ajax. Now how can I pass this value to scriplet without page
how can create clock baisc in java
how can create clock baisc in java   think u for help me ..   import java.awt.*; import java.util.*; import javax.swing.*; import... { DisplayClock() { final JLabel timeField = new JLabel
how can create clock baisc in java
how can create clock baisc in java   think u for help me ..   import java.awt.*; import java.util.*; import javax.swing.*; import... { DisplayClock() { final JLabel timeField = new JLabel
how can create clock baisc in java
how can create clock baisc in java   think u for help me ..   import java.awt.*; import java.util.*; import javax.swing.*; import... { DisplayClock() { final JLabel timeField = new JLabel
can you explain ?
can you explain ?  my dear can you teel me the explaintion for this code i need it GregorianCalendar cal = new GregorianCalendar(y, m, 0...(); } } iam explain whole code exept this part can you help
Advertisements
 

 

 

DMCA.com