Results 1 to 5 of 5
Thread: String Display problem
- 06-15-2010, 08:58 AM #1
Member
- Join Date
- Jun 2010
- Posts
- 6
- Rep Power
- 0
- 06-15-2010, 09:04 AM #2
Senior Member
- Join Date
- Jun 2008
- Posts
- 2,366
- Rep Power
- 7
So, don't display the String, but display the result of some String method.
for example, instead of
useJava Code:System.out.println(str);
Java Code:System.out.println(str.replaceFirst("\\..*$", "");
- 06-15-2010, 09:16 AM #3
Member
- Join Date
- Jun 2010
- Posts
- 6
- Rep Power
- 0
thanks for your rply.. but am using one file as a tree DefaultMutableTreeNode and in my tree it is showing a full name of my File with extension, i want to ignore that extension while displaying... so how it is possible?
- 06-15-2010, 09:39 AM #4
Senior Member
- Join Date
- Jun 2008
- Posts
- 2,366
- Rep Power
- 7
The principle is the same, but, of course, you also then, need a TreeRenderer, see the swing tutorials.
- 06-15-2010, 01:15 PM #5
Similar Threads
-
How to display Output String in asterix?
By shalini_priya in forum New To JavaReplies: 1Last Post: 11-24-2009, 11:36 AM -
How to display a String that contains more than one white spaces
By thachun in forum JavaServer Pages (JSP) and JSTLReplies: 2Last Post: 09-27-2009, 09:16 AM -
Need to display the jsp variable(String) into html?
By Arivudai Nambi in forum JavaServer Pages (JSP) and JSTLReplies: 0Last Post: 02-25-2009, 05:44 PM -
Cannot display a random string from .dat file
By explosion242 in forum New To JavaReplies: 2Last Post: 09-18-2008, 01:48 PM -
Problem with display in Netbeans 5.5
By Albert in forum NetBeansReplies: 1Last Post: 07-13-2007, 03:33 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks