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(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

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... JFrame(); f.setLayout(null); JLabel l=new JLabel(str
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 [email protected]  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
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
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 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
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
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
modify this so that i can work better - Swing AWT
modify this so that i can work better  this program is about opening...; public class OpenSavingsAccount2 extends JFrame { private JLabel name; private JLabel gender; private JLabel facultyName; private JLabel courseName
please modify this so that it can work better - Swing AWT
please modify this so that it can work better   this program... extends JFrame { private JLabel name; private JLabel gender; private JLabel facultyName; private JLabel courseName; private JLabel year; private JLabel
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
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
how can i create a mysql database to connect to this code - JDBC
how can i create a mysql database to connect to this code  i need... text1,text2,text3,text4,text5,text6,text7,text8,text10; JLabel label1,label2,label3,label4,label5,label6,label7,label8,label9,label10,label; JPasswordField text,text9; JLabel lab1; JPanel
how can i create a mysql database to connect to this code - JDBC
how can i create a mysql database to connect to this code  i need... text1,text2,text3,text4,text5,text6,text7,text8,text10; JLabel label1,label2,label3,label4,label5,label6,label7,label8,label9,label10,label; JPasswordField text,text9; JLabel lab1; JPanel
What can R do that Python can t?
What can R do that Python can t?  Hi, I am beginner in Data Science... can R do that Python can t? Try to provide me good examples or tutorials links so that I can learn the topic "What can R do that Python can t?"
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 static?
Can a class be declared as static?  Hi, Can a class be declared as static? thanks
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 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 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 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
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 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
Can lawyers be replaced by AI?
Can lawyers be replaced by AI?  Hi, I am beginner in Data Science and machine learning field. I am searching for the tutorials to learn: Can... that I can learn the topic "Can lawyers be replaced by AI?". Also tell
can any one explain this
can any one explain this  class Clidder { private final void flipper() { System.out.println("Clidder"); } } public class Ex3 extends Clidder { public final void flipper() { System.out.println
Can someone help me with this?
Can someone help me with this?  I have this project and i dont know how to do it. Can someone help me? please? Write a java class named "PAMA" which define a main () method that performs simple arithmetic. (e.g. Add, Subtract
Please can you help
Please can you help  I have a some code which uses a textarea comment box that will on post return the users text to the same page that they entered it on. However I wanted it to be able to check for a existing comment and create
Can you correct this codes?
Can you correct this codes?  Exception in thread "AWT-EventQueue-0" java.lang.ArrayIndexOutOfBoundsException: 4 at searchcon.(searchcon.java:39) at search.initComponents(search.java:41) at search.(search.java:7) at payroll
Music Can Be Heard on the iPad
Music Can Be Heard on the iPad The Apple iPad is a device that, like the iPod and iPhone, can work with music features. These are all features... of the iPad to work with playing back music. A user can easily upload music files
How can i add a new count to this source code ? - Java Beginners
How can i add a new count to this source code ?  Hi everyone I...;ZHTYPE (Just Logical) Please tell me how can i see this output? Code...(String line) { StringTokenizer st = new StringTokenizer(line
How can i add a new count to this source code ? - Java Beginners
How can i add a new count to this source code ?  Hi everyone I...;ZHTYPE (Just Logical) Please tell me how can i see this output? Code...) { StringTokenizer st = new StringTokenizer(line
How can we destroy the cookie?
How can we destroy the cookie?   How can we destroy the cookie
Can a abstract class be declared final?
Can a abstract class be declared final?   Hi, Can a abstract class be declared final? Thanks
Can an Interface implement another Interface?
Can an Interface implement another Interface?   Hi, Can an Interface implement another Interface? Thanks
Can an Interface extend another Interface?
Can an Interface extend another Interface?   Hi, Can an Interface extend another Interface? thanks
Can we use maven with spring
Can we use maven with spring  Hi, I am going to learn spring framework and checking if maven can be used? Can I use maven to build Java Spring framework projects? Thanks
ModuleNotFoundError: No module named 'can-isotp'
ModuleNotFoundError: No module named 'can-isotp'  Hi, My Python... 'can-isotp' How to remove the ModuleNotFoundError: No module named 'can... have to install padas library. You can install can-isotp python with following

Ads