How to change data in jtable?
Hai.I have a problem to change data in jtable.Can anbody help me to slove this?
Think you in advance
Did you want to change individual cells?
For example, to change cell (2, 1) to "new data":
yourTable.setValueAt("new data", 1, 2)
Similar Messages
-
URGENT !!! HOW CAN CHANGE DATA IN JTABLE!!!
My Program ....
pLinhas.dataModel.addTableModelListener(new TableModelListener() {
public void tableChanged(TableModelEvent e) {
int row = e.getFirstRow();
int column = e.getColumn();
Object data = pLinhas.dataModel.getValueAt(row,column);
Object valor = pLinhas.dataModel.getValueAt(row,6);
System.out.println("Quantidade -" + data.toString());
System.out.println("Valor a Cobrar -" + valor.toString());
setValueAt(data,row,6);
public void setValueAt(Object value, int row, int col) {
System.out.println("Mudou ou nao");
pLinhas.dataModel.fireTableCellUpdated(row, col);
this dont work. When the method setValue() run, the java break.
the message are :
# An EXCEPTION_STACK_OVERFLOW exception has been detected in native code outside the VM.
# Program counter=0x77e94aa0
how can i change my data for a new data in jtable.
tx for help.I had a problem similar to this. I was writing my own table model which would work sometimes and at other times fail similar to what you describe. I ended up printing out the source code to the DefaultTableModel and taking a look at it and then deciding to subclass that class and add my additional functionality as opposed to writing a completely new model and trying to duplicate the DefaultTableModel. My needs were relatively simple and the subclassing fixed the problem. I can change data with no problem in the displayed table. If you're not already subclassing and trying to write your own table model you may want to give this a try. I'd struggled with the problem for several days thinking I'd fixed it and having it come up again. I invested 2 hours doing the subclassing and the problem has never appeared since then. I know I just missed doing something in the table model I was trying to write but my schedule was tight and the subclassing offered a quick fix. Hope this helps!
-
How to change data type of attribute in caf
hi.
this is my problem.
i been added a attribute in an entity service called emloyee. named "Birthday", use the data type "com.sap.caf.core.date".
when i tried modify the entity service, i hit exception about "DST Daylight Saving Time".
because of DST, the date will add an hour such like "1957/04/01 00:00:00.0" to "1957/04/01 01:00:00.0", and com.sap.caf.core.date will throw an exception.
is anyone had same problem like me?
how to fixed it(if passable)?
and, how to change data type?
thanks.Hi Sruthi,
all you need to do on this is open the report go to the parameters, select the parameter that you wish to change and click "Edit". This will allow you to change thefield to a date rather than a date time.
Regards,
Noel -
How to change data source name and context root during deployment
Hi,
Env:
WLS 10.1.3
JDev 11.1.1.6
Hudson
I need to deploy two instances of my ADF application on the same development enviroment. We are using Hudson to deploy. My question is how to change data source name and application context root before second deployment.
KubaI don't believe there is an inbuilt facility to do this.
Previously how I've done this is when checking files out using Hudson jovs, before the build I then use an Ant extension called XmlTask (http://www.oopsconsultancy.com/software/xmltask/) to modify the required XML files.
Can I ask why you're doing this in the first place please? Multi-tenancy? 2 versions of the same app?
CM. -
How to change data format from MM/DD/YYYY to DD/MM/YYYY
HI,
How can we change data format from MM/DD/YYYY to DD/MM/YYYY in Prompt and Report Level in obiee 11g.
Please help me ont this.
ThanksHi,
In Prompt:
Try using EVALUATE function.
Eg: Evaluate('TO_CHAR(%1,%2)' as character(30),"D5.Times"."Day Date",'DD-MON-YYYY')
Report level:
Try this in the column formula-
Evaluate('TO_CHAR(%1,%2)' as character(30),"D5.Times"."Day Date",'MM/DD/YYYY')
(or)
EVALUATE('TO_CHAR(%1,%2)' AS CHARACTER ( 30 ), "Dim- Date".Start Date, 'MON-YY')
http://108obiee.blogspot.in/2009/03/how-to-change-date-format-mask-in-date.html
http://obiee-bip.blogspot.in/2011/08/customizing-obiee-calendar-display.html
Some other methods.
Metdhod 1:
'Save System-Wide Column Formats' Option
Check this.
http://siebel-essentials.blogspot.com/2010/10/11-obiee-11g-tips-9-system-wide.html?m=1
Thanks
satya -
How to change date format in OBIEE
Hello
I have a need to change the date column to a varchar column in OBIEE..
The date column stores data in the format of 'YYYY/MM/DD', I need to change this to a varchar column with this format 'YYYYMM'..
Since I am pointing directly at the transactional database, I can't make any changes at the database level, so I will have to do it in OBIEE layer, any ideas how it could be done?
Many thanks in advance!hi user,
Refer : http://varanasisaichand.blogspot.com/2010/01/how-to-change-data-format-to-our-custom.html
http://varanasisaichand.blogspot.com/2010/05/evaluate-function.html
Thanks,
Saichand.v -
How to change date format in select-option (mm.yyyy).
Hi,
Plz, How to change date format in select-option (mm.yyyy).
in my selection screen date type selection-option is there ,when i am enter date it's taken dd.mm.yyyy format,but i want mm.yyyy format.
how to set that .
Regards,
Kk.sorry
parameters : pmonyr type spmon or
select-options : sspmon for PGPL-spmon .
or what table ccontains spmon.
regards
shiba dutta -
How to change Date format in Prompts.
Hi,
How to change Date format to DD/MM/YYYY in Dashboard Prompts.Kindly let me know.Hi,
try to below ways
1) By using cast fxn you can solve it.
SELECT CAST("YOUR COLUMN" AS DATE) FROM "SUBJECT AREA NAME"
2) This is a known bug get patch Bug 9280334: CALENDAR DD/MM/YYYY PROMPT IN DASHBOARD RETURNING FORMAT YYYY-MM-DD HH:MI:SS from support.oracle.com
3) refer
http://108obiee.blogspot.com/2009/04/changing-date-format-mask-in-javascript.html
Thanks
Deva -
Can anyone help me with this, Please?
I have a form with start date and end date and the date format I am getting is YYYY-MM-DD. But I would like to change it to MM-DD-YYYY format. How do I achieve this??
When I went to JFPREAMBLE_1, i see it reads:
^define group:PO_DOC_COMM__SVC_STRT_DT!FldNotAvail \groupG_Commodity_Line\fieldPO_DOC_COMM__SVC_STRT_DT.
^define group:PO_DOC_COMM__SVC_STRT_DT!FldUsed \groupG_Commodity_Line\fieldPO_DOC_COMM__SVC_STRT_DT.
^define group:PO_DOC_COMM__SVC_END_DT!FldNotAvail \groupG_Commodity_Line\fieldPO_DOC_COMM__SVC_END_DT.
^define group:PO_DOC_COMM__SVC_END_DT!FldUsed \groupG_Commodity_Line\fieldPO_DOC_COMM__SVC_END_DT.
Can I change anything here to change the format??? Or how do I change date format??
I would really appreciate your help on this. Thanks in advance.Hi,
Try this in the column formula-
Evaluate('TO_CHAR(%1,%2)' as character(30),"D5.Times"."Day Date",'MM/DD/YYYY')
(or)
EVALUATE('TO_CHAR(%1,%2)' AS CHARACTER ( 30 ), "Dim- Date".Start Date, 'MON-YY')
http://108obiee.blogspot.in/2009/03/how-to-change-date-format-mask-in-date.html
http://obiee-bip.blogspot.in/2011/08/customizing-obiee-calendar-display.html
Some other methods.
Metdhod 1:
'Save System-Wide Column Formats' Option
Check this.
http://siebel-essentials.blogspot.com/2010/10/11-obiee-11g-tips-9-system-wide.html?m=1
Thanks
satya
Edited by: Satya Ranki Reddy on Jul 2, 2012 3:57 PM
Edited by: Satya Ranki Reddy on Jul 2, 2012 3:59 PM
Edited by: Satya Ranki Reddy on Jul 2, 2012 4:13 PM -
How to change date format in BR?
Hi all!
Does anybody know how to change date format in BR?
I created global variable with type DateAsNumber and usage type run-time promt and used it in BR
Then I launched a BR on the form and chose necessary date. Date stored in MM/DD/YYYY format, but I need DD/MM/YYYY.
I tried to change format through Planning but then I recieved uncorect result(for instance, I selected 4(April)/14/2009 but it was stored as 4/02/2010)Hi,
the date is always stored the same in Essbase. I think it's YYYYMMDD.
You can change the format you enter the date in webforms and business rules by changing your planning application settings (Preferences->Display Options).
Cheers. -
How to insert data from JTable to mysql Table....
hello everybody
i need help about how to insert data from JTable to mysql table... i know about how to create Table model...facing problem about how to insert data from JTable to mysql table....any helping link or code ... ill be thankfulll....for giving me solution...table1.getValueAt(table1.getSelectedRow(),0)you are getting the value of a selected row... or if you want you can just use a loop..
for(.....){
table1.getValueAt(x,y);
}I think you know INSERT STATEMENT.. here on it just string concat
sample e.g. (This not insert)
"delete from accrule " +
"where ruleid= " + tblRA.getValueAt(tblRA.getSelectedRow(),0)+
" and accountname='"+tblRA.getValueAt(tblRA.getSelectedRow(),1)+"'" -
How to Change Date Format in Registry
how to change date format in registry so when u qeury the date column, it display in our specific format like 20-05-2005 instead of 20-may-05. i dont want to use to_char in query
thanksUnder HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\HOME{X}
NLS_DATE_FORMAT = 'dd-mm-yyyy'
You could also change the database date format :
SQL> alter system set NLS_DATE_FORMAT = 'dd-mm-yyyy' scope=spfile;
and restart the DB. -
How to resize data in JTable?
Hi all,
I wish to provide a resize button on an application which will resize the data in a table (in most cases just text) as well as the table containing it. Is it possible to directly resize the table or must I change the renderer to draw all of the data bigger? I'm also not sure how to increase the width of the table. Any help would be much appreciated.
package gui;
import java.awt.BorderLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTable;
import javax.swing.SwingUtilities;
import javax.swing.table.DefaultTableModel;
public class Resizer extends JFrame
* @see java.io.Serializable
public static final long serialVersionUID = 0;
* Table containing data
private JTable table = null;
* Scroll pane containing table
private JScrollPane scroller = null;
* Name of button to increase text size
private static final String INCREASE = "Increase";
* Name of button to decrease text size
private static final String DECREASE = "Decrease";
* An increment to use when resizing
private static final int INCREMENT = 5;
public Resizer()
setTitle("Resizer");
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setSize(300,200);
getContentPane().setLayout(new BorderLayout());
// Add the table and its contents
table = createTable();
scroller = new JScrollPane(table);
getContentPane().add(scroller, BorderLayout.CENTER);
// Add buttons to resize
JButton increase = new JButton(INCREASE);
increase.addActionListener(new ButtonListener());
JButton decrease = new JButton(DECREASE);
decrease.addActionListener(new ButtonListener());
JPanel panel = new JPanel();
panel.add(increase);
panel.add(decrease);
getContentPane().add(panel, BorderLayout.SOUTH);
// Show this window
setLocationRelativeTo(null);
setVisible(true);
private JTable createTable()
JTable t = new JTable();
t.setModel(new MyModel());
// Row 1
t.getModel().setValueAt("John", 0, 0);
t.getModel().setValueAt(new Integer(1), 0, 1);
// Row 2
t.getModel().setValueAt("Chris", 1, 0);
t.getModel().setValueAt(new Integer(2), 1, 1);
// Row 3
t.getModel().setValueAt("Susan", 2, 0);
t.getModel().setValueAt(new Integer(3), 2, 1);
return t;
private class MyModel extends DefaultTableModel
private static final long serialVersionUID = 2;
public MyModel()
this.setColumnCount(2);
this.setRowCount(3);
public String getColumnName(int col)
switch(col)
case 0:
return "Name";
case 1:
return "Number";
default:
return "Oops";
private class ButtonListener implements ActionListener
public void actionPerformed(ActionEvent ae)
if (((JButton)ae.getSource()).getText().equals(INCREASE))
increaseTable();
else if (((JButton)ae.getSource()).getText().equals(DECREASE))
decreaseTable();
private void increaseTable()
this.setSize(this.getWidth()+INCREMENT, this.getHeight()+INCREMENT);
table.setRowHeight(table.getRowHeight()+INCREMENT);
table.setSize(table.getWidth()+INCREMENT, table.getHeight()+INCREMENT);
private void decreaseTable()
this.setSize(this.getWidth()-INCREMENT, this.getHeight()-INCREMENT);
table.setRowHeight(table.getRowHeight()-INCREMENT);
table.setSize(table.getWidth()-INCREMENT, table.getHeight()-INCREMENT);
public static void main(String[] args)
SwingUtilities.invokeLater(new Runnable()
public void run()
new Resizer();
}Using JDK 1.4.2Thanks all.
The solution was to use setFont() on the table and its headers. Here's what I put in to increase and descrease the table size (for future reference).
* Increases the size of everything in the table
private void increaseTable()
table.setRowHeight(table.getRowHeight() + INCREMENT);
table.setSize(table.getWidth() + INCREMENT, table.getHeight() + INCREMENT);
for (int i = 0; i < table.getColumnCount(); i++)
TableColumn col = table.getColumnModel().getColumn(i);
col.setWidth(col.getWidth() + INCREMENT / table.getColumnCount());
Font headerFont = table.getTableHeader().getFont();
table.getTableHeader().setFont(headerFont.deriveFont(headerFont.getSize2D()+INCREMENT));
Font dataFont = table.getFont();
table.setFont(dataFont.deriveFont(dataFont.getSize2D() + INCREMENT));
* Decreases the size of everything in the table
private void decreaseTable()
if (table.getRowHeight() > INCREMENT)
table.setRowHeight(table.getRowHeight() - INCREMENT);
table.setSize(table.getWidth() - INCREMENT, table.getHeight() - INCREMENT);
for (int i = 0; i < table.getColumnCount(); i++)
TableColumn col = table.getColumnModel().getColumn(i);
col.setWidth(col.getWidth() - INCREMENT / table.getColumnCount());
Font headerFont = table.getTableHeader().getFont();
table.getTableHeader().setFont(headerFont.deriveFont(headerFont.getSize2D()-INCREMENT));
Font dataFont = table.getFont();
table.setFont(dataFont.deriveFont(dataFont.getSize2D() - INCREMENT));
} -
How to change date for Compensation Package Offer (IT0706)
I try to change date for an existing record in IT0706 to a later date, however system prompted "The compensation package was already activated. It can not be changed" As I checked, the record status is "Activated". Can anybody help to advice on how to change the date ?
Thanks~Hi Kishor...Thanks for reply...
But i need to change my precentation variable date formt...
i need to write one text like: 'Year to dd/month/yy' in one column formula..
So how can i achieve it.. -
How to change data type of input parameter
Hi
In my procedure i declared the data type of "Value Date" Input parameter as Date where as in CR it is showing data type as "Date Time". Can any one please specify how to change to Date.
While prompting for input parameter in description it is showing message as
Please enter Date time in format"yyy-mm-dd hh:mm:ss" . To change the content selected "format field" option. But is there any way to change input parameter data type.
Please suggest how to change.
Thanks SruthiHi Sruthi,
all you need to do on this is open the report go to the parameters, select the parameter that you wish to change and click "Edit". This will allow you to change thefield to a date rather than a date time.
Regards,
Noel
Maybe you are looking for
-
How to make IIS on Windows 7 visible from outside my home LAN
Guidance Needed: How to make IIS on Windows 7 visible from outside my home LAN. I am building a learning/demo ASP.NET website on this Win7 PC, using VS2008. I would like to share the website with a client/friend, so I need my local IIS to be visible
-
OIM: What is Precompiled folder used for?
Hi. I've just wanted to ask - why copies of OIM application files (such as xlWebApp.war and Nexaweb.war) are duplicated in the OIM_HOME\xellerate\webapp\precompiled folder? When I want to change the appearance of the OIM web-console, I replace the xl
-
Delegated Admin Customization problem
Delegated Administrator 7.0-0.00 I'm trying to disable the ability to change the Mail & Message Quota when assigning an additional service package using Delegated Admin OrganizationAdminRole.WizardWindow.Wizard.WizardPage11.MailQuotaValue=NONEDITABLE
-
TC for Oracle E-Business Suite Diagnostics for Release 11i
For those who already installed this patch, how long it takes for each task: Step 1: Pre-install Task Step 2: Installation Tasks Step 3: Post-install Tasks Thanks.
-
How do I read or change TimeStamp in log files?
We have deployed BIPublisher 10.1.3.4 EAR into OC4J container. I am seeing the following timestamp in BI log files.. [010909_032352774][][STATEMENT] [org.quartz.jobStore.isClustered]=[false] [010909_032352774][][STATEMENT] [org.quartz.jobStore.misfir