sri rallapalli

Ranch Hand
+ Follow
since Mar 15, 2005
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by sri rallapalli

I am using DefaultTableModel.
I am using the functions as model.removeRow(), model.addRow().

regards,
Sri.
14 years ago
Hi All,
I am working on the JTable, and i am able to add, edit, delete rows from the table. But when i delete a table and then click the add, then it is not working, it is throwing ArrayIndexOutofBoundException. What i suspecting is, initially the table built with for example 5 rows, and if i delete one row, now it will become 4, but the table not refreshed with 4 rows, so when clicking the add button, it was trying to fetch 5 records. Please let me know how to rectify this problem. I am new to swings.

thanks in advance,
regards,
Sri.
14 years ago
Hi All,

I am new to swings, and i am working on a swing application. I have developed some screens, in 1st screen i am showing the rows in the JTable, and i have 3 buttons Add,Edit,Delete.
For all the 3 actions(Add,Edit,Delete)
I will select a row in the Table, and then click the Button.

1. When i click the Add button, It will open another window with the existing values as default values, to take the new values and then if click ok, then it will be going to add a new Row to the table.

2. When i click edit button, It will open another window with the existing values as default values, to take the new values and then if click ok, then it will be going to change the Row that was selected and update to the table.

3. When i click the Delete button, it will delete the row, abd refresh the table.
In all the 3 operations, it will update the Database.
I am writing seperate classes for the 3 operations, and I am writing a seperate class for the Table to display its values.

Now the problem is, it is not refreshing the table contents when i do the operation, but when i close everything, and reopen freshly, i am able to see the content correctly. I want to see the Changes immediately after i do the operations.

Please help me. This is urgent.

Regards,
Srinivas.
14 years ago
Hi All,

I have one stored procedure with 9 in parameters and one out parameter. In oracle the OUT parameter was declared as BINARY_INTEGER. I am sending all the arguments correclt, and for the 10th argument i specified like the following:
cs.registerOutParameter(10,java.sql.Types.INTEGER);
I am not sure whether the above is correct or worg, and i did not get any errors while compiling. now i am trying to execute the StoredProcedure, after cs.execute();, it was giving the "SQLException Parameter Conflict"
Any light on this, where could be the problem lies.

thanks in advance,
Sri.
I am working in swings now, and I am new to this.

I have one requirement where in which

1st screen contains a text box, and a search button, so I need to enter a value, and I need to click the search button. After clicking the search button, it should display another screen, where it should contain a JTable with 5 colums, and 3 buttons (ADD, EDIT, DELETE).

1. I have to display some set of records in a table, table contains 5 columns, �result set� from the database may contain more records; it should display the values in the 5 columns for all the records.

2. From the JTable with the set of records, I can select a row, and click the ADD, EDIT, DELETE button, then it should display those values of the 5 columns for that particular row in text boxes in a new window, again it should contain 2 buttons, ok, cancel.

3. If I click on the ok button, first it should store in the database, and at the same time it should refresh the table contents with the new values.



I have done it but it is not working properly. What I did was, after displaying the values in the JTable, and then after clicking edit button, I am entering the values, it is updating the database, but, while to see the reflected values I need to do an Alt-Tab, and select the window, then only I am able to see the content otherwise I am not able to see the reflected contents.



Please suggest me a solution.
14 years ago
What ever I am writing in the server function I am putting it in the
Try { } and then I am trying to catch the exception. But it is not getting caught here.

In the server logs it is showing something like: Visibroker for java runtime caught exception; java.lang.NullPointerException.

And then showing some xxxHelper.java, etc.

can anyone help me please...

regards,
Sri.
15 years ago
it is not a programatic exception. I am not able to catch that. Once i called the serverside function, it is getting called, and then it is trying to send the result back to the client, during the transfer to the client it is giving this exception, some where in the Helper classes, those classes have been generated after compiling the IDL file.
15 years ago
Hi All,
I am new to CORBA, i have written an idl file, and a pecific method is returning an arra, , in the server, i have created 2 objects and added to the array object, then returned to the client. From the client i am trying to call the the function, now at the server side, i am getting a NullpointerException, in the Helper class. I am not sure whats happening over there. Any light on this?

Regards,
Sri.
15 years ago
Hi,
I am new to CORBA, I am writing idl files, one place i was writing a function, which is returning a Vector, it is giving error. what can i use instead of Vector?
regards,
Sri.
15 years ago
Hello All,
I was trying to set a value to the text box and then i want to make it uneditable, so i am trying to do the following steps,
String value = "Dynamic";
JTextField jtxt = new JTextField();
jtxt.setText(value);
jtxt.setEditable(false);
But it is not working, still i am able to change the value in the text field.
Please let me know what to do to make it disable.
Regards,
Sri.
15 years ago
Hi,

Just in addition to the previous explanation, if i close the serach window, then i am able to do the operations on the new pop-up JTable window, i just want to know, what should i do, to do the operations on the pop-up JTable even though the search window is in open state.

regards,
Sri.
15 years ago
Hi I have got one example in
http://forum.java.sun.com/thread.jspa?threadID=5166643&tstart=105 link
and i modified it, it is working fine.

import java.awt.*;
import java.awt.event.*;
import java.util.*;
import java.io.*;
import javax.swing.*;
import javax.swing.event.*;
import javax.swing.table.*;

public class TableRowColumn extends JFrame
{
JTable table;
DefaultTableModel model;
JPanel buttonPanel;
JButton button;

public TableRowColumn()
{
// Create table

Object[][] data =
{
{new Integer(1), "A"},
{new Integer(2), "B"},
{new Integer(3), "C"}
};
String[] columnNames = {"Number","Letter"};
model = new DefaultTableModel(data, columnNames);
table = new JTable(model)
{
public boolean isCellEditable(int row, int column)
{
return true;
}
};

table.putClientProperty("terminateEditOnFocusLost", Boolean.TRUE);
table.setPreferredScrollableViewportSize(table.getPreferredSize());
table.getColumnModel().getColumn(0).
setCellRenderer( table.getDefaultRenderer(Integer.class) );

// Add table and a Button panel to the frame

final JScrollPane scrollPane = new JScrollPane( table );
getContentPane().add( scrollPane, BorderLayout.CENTER );

buttonPanel = new JPanel();
getContentPane().add( buttonPanel, BorderLayout.SOUTH );

button = new JButton( "Add" );
button.setMnemonic('A');
buttonPanel.add( button );
button.addActionListener( new ActionListener()
{
public void actionPerformed(ActionEvent e)
{
System.out,println("In the Add action");
}
});

button = new JButton( "Update" );
buttonPanel.add( button );
button.addActionListener( new ActionListener()
{
public void actionPerformed(ActionEvent e)
{
System.out,println("In the Update action");
}
});

button = new JButton( "Delete" );
buttonPanel.add( button );
button.addActionListener( new ActionListener()
{
public void actionPerformed(ActionEvent e)
{
System.out,println("In the Delete action"); }
});

}

public static void main(String[] args)
{
TableRowColumn frame = new TableRowColumn();
frame.setDefaultCloseOperation( EXIT_ON_CLOSE );
frame.pack();
frame.setLocationRelativeTo( null );
frame.setVisible(true);
}
}

But the same thing i want to implement in my application, i am getting the window with the rows, but I am not able to select anything, or click any of the buttons.

In my application i have one text field and search button, after entering the test, and clicking the serach button, I should get this window with rows, and i should be able to select, and do the operations.

I have commented the main function in the above class.
Then i have created an instance of the class in the actionPerformed() of the search button, then i did the following things in the actionPerformed() of the search button.

TableRowColumn frame = new TableRowColumn();
frame.pack();
frame.setVisible(true);

I am not able to select any row, and i am not able to click the buttons.
Please suggest me what to do now.

Regards,
Sri.
15 years ago
Hello All,
I am new to swing.
I have one requirement, I have to display some set of records(dinamically) in a table and at the end of displaying all the records, i should have 3 buttons, for editing, deleting and adding. I should also be able to select the records in the table then if i click the button, then i need to do the corresponding actions. Please help me in developing such window.

thanks,
Sri.
15 years ago
Hello All,

I am doing an application in one JSP file, i am trying to 3 different types of database operations and then trying to display the result. I am not sure whats happening, but the connection is getting closed "Error: Transaction: forcibly releasing the Connection", throwing an exception ConnectionException.
Please help me in resolving the issue.
is it like the database operations are taking more time, in the mean while the JSP is getting time out?
Any light on this!!!

Thanks in Advance,
Sri
15 years ago
JSP
Hello All,
I am currently using an application, and we did changes for effecting the DST(day light savings time). i am trying to get the time zones in my logs also, but what i found was, sometimes, i am getting EST and some times i am getting EDT. I am supposed to get EDT in all the places. In my java code i am using something like:
static
{
TimeZone.setDefault(TimeZone.getTimeZone(System.getProperty("SystemTimes.TimeZone","EST")));
}

I tried changing the EST to EDT, then i am getting GMT in my logs. What needs to be done to get EDT into my logs instead of EST.

Regards,
Sri.
15 years ago