NTNUJAVA Virtual Physics Laboratory
Enjoy the fun of physics with simulations!
Backup site http://enjoy.phy.ntnu.edu.tw/ntnujava/
November 20, 2017, 09:09:40 am *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
 
   Home   Help Search Login Register  
Last chance is the best chance. ...Wisdom
Google Bookmarks Yahoo My Web MSN Live Netscape Del.icio.us FURL Stumble Upon Delirious Ask FaceBook

Pages: [1]   Go Down
  Print  
Author Topic: how to format columns of datatable  (Read 8610 times)
0 Members and 1 Guest are viewing this topic. Click to toggle author information(expand message area).
Fred Chuit
Newbie
*
Offline Offline

Posts: 18



«
Embed this message
on: October 10, 2009, 01:37:14 am » posted from:Steinsel,Luxembourg,Luxembourg

Dear EJS-users,

I have a problem when using a datatable.
It is a datatable with 3 columns.
I want to format the output of all columns on 1 decimal numbers (3.9 for instance).
When I put 0.0 in the ColumnFormat only the first column is formatted in 1 decimal, the other colums still have 3 decimals.
How can I fix this?
Already thanks for any help and advice.
Regards,
Fred
Logged
lookang
Hero Member
*****
Offline Offline

Posts: 1784


http://weelookang.blogspot.com


WWW
«
Embed this message
Reply #1 on: October 10, 2009, 08:11:54 am »

Please attach your XML so that other ejs users can immediately understand your question.
I have not tried tables formatting. Smiley
Logged
Fred Chuit
Newbie
*
Offline Offline

Posts: 18



«
Embed this message
Reply #2 on: October 10, 2009, 08:40:36 pm » posted from:Steinsel,Luxembourg,Luxembourg

I used the DataTable example from the ejs help-pages.
I include the example I use.
Alas I can not manage to format the last column, this one always is 3 decimals.
What to do to format all columns.
I would be grateful for any help or advice.
Regards,
Fred


*** There are 1 more attached files. You need to login to acces it!
Logged
lookang
Hero Member
*****
Offline Offline

Posts: 1784


http://weelookang.blogspot.com


WWW
«
Embed this message
Reply #3 on: October 11, 2009, 08:32:41 am » posted from:Singapore,,Singapore

i figure out the formatting
column names
new String[]{"#","t","x","C"}
column format
new String[]{"0.0","0.0","0.0","0.0"}

i will add this into the wiki http://www.um.es/fem/EjsWiki/Main/ElementsDataTable

i see u are exploring Ejs, great man, keep it up. Grin

Embed a running copy of this simulation

Embed a running copy link(show simulation in a popuped window)
Full screen applet or Problem viewing java?Add http://www.phy.ntnu.edu.tw/ to exception site list
Press the Alt key and the left mouse button to drag the applet off the browser and onto the desktop. This work is licensed under a Creative Commons Attribution 2.5 Taiwan License
  • Please feel free to post your ideas about how to use the simulation for better teaching and learning.
  • Post questions to be asked to help students to think, to explore.
  • Upload worksheets as attached files to share with more users.
Let's work together. We can help more users understand physics conceptually and enjoy the fun of learning physics!


*** There are 1 more attached files. You need to login to acces it!
« Last Edit: October 11, 2009, 08:34:50 am by lookang » Logged
Fred Chuit
Newbie
*
Offline Offline

Posts: 18



«
Embed this message
Reply #4 on: October 12, 2009, 09:05:20 pm » posted from:Meppel,Drenthe,Netherlands

Dear mr. Lookang,

Thanks for your help. You are fast in finding the solution.
Now I can continue with the applet.
Again many thanks!
Regards,
Fred
Logged
Pages: [1]   Go Up
  Print  
Last chance is the best chance. ...Wisdom
 
Jump to:  


Related Topics
Subject Started by Replies Views Last post
Translate Strings into local language format
Mirror sites and different language versions
Fu-Kwun Hwang 5 43640 Last post December 21, 2010, 02:29:02 pm
by georgerobinson
can the interface - field - format show special characters like alpha
Questions related to EJS
lookang 17 17980 Last post December 04, 2008, 05:10:51 pm
by lookang
this is how to make display show in scientific format 0.00E00 like tracker
Questions related to EJS
lookang 2 4408 Last post August 11, 2010, 08:05:48 am
by lookang
Powered by MySQL Powered by PHP Powered by SMF 1.1.13 | SMF © 2006-2011, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Page created in 0.143 seconds with 22 queries.since 2011/06/15