pooja prabhu

Ranch Hand
+ Follow
since Sep 23, 2012
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
(keep public parts private until JForum day)
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt
Moderation Tools

Recent posts by pooja prabhu

what will be the format?
4 years ago
i had tried it it gives me exception

java.lang.IllegalStateException: Cannot get a text value from a numeric cell
4 years ago
i cant read correct mobile number. it saves 2147483647 instead of mobile number
4 years ago
yes i have already started
I take file name from text box
4 years ago
Thanks James
Actually i am new to java so can you elaborate?
Can You Tel Me how to do it..
4 years ago
hi

Can Anyone please tell me how to read mobile number example:9823145678 in java from excel

Thank you
4 years ago
thanks for your valuable time.... Issue solved...
4 years ago
yes..all the parts are interrelated..I dint know how to put code tabs.
4 years ago
4 years ago
Thanks for reply......I have declared a string on line 42. can you Elaborate?
4 years ago
Hello

I have a form in which i have menu items and in one item there is a form containing JTabbedPane. My Jtabbedpane contains JScrollPane. The Problem is When I run My Project for the first time it works fine.But if i close the second screen and and load it again it doesn't show any records. Do Check Attachment.
Please help guys
4 years ago
hello guys

i have populated database values in jtable but they dont get displayed until i resize coloumns..


Please help
4 years ago
Guys i have created a tabbed pane with tabs whose values i have retrieved from database. and i have attached a panel array to it in which i have created table.Now When I change my tab it doesnt show table with records

Please help

<code>
public void stateChanged(ChangeEvent e) {


String name;
name=tab.getTitleAt( tab.getSelectedIndex());
System.out.println(name);
int ind=tab.getSelectedIndex();
panels[ind].revalidate();
panels[ind].repaint();




if(name.equals("Direct"))
{
try{


chooser=new JFileChooser();
panels[ind]=new JPanel();

chooser.setBounds(150, 100, 80, 32);
panels[ind].add(chooser);
panels[ind].revalidate();
panels[ind].repaint();
}
catch(Exception mn)
{
System.out.println(mn);
}
}
else
{
try{

scroll.removeAll();
table.removeAll();
// scroll.revalidate();
// scroll.repaint();
// table.revalidate();
// table.repaint();
System.out.println(temp);


//
try
{

Statement stmt =(Statement) MySqlConnection.conn().createStatement();
String sql1="select * from event_type";
ResultSet rset=(ResultSet) stmt.executeQuery(sql1);

while(rset.next())
{
event_desc= rset.getString("event_type_desc");

String j;
j=tab.getTitleAt( tab.getSelectedIndex());

try

{
data.clear();
String event="";
Statement stmt5 =(Statement) MySqlConnection.conn().createStatement();
String sql5="select * from event_master,person_details,event_type where event_type.event_type_desc='"+j+"' AND person_details.person_name like'"+temp+"%'AND event_master.event_type_id=event_type.event_type_id AND event_master.person_id=person_details.person_id";
try{
ResultSet rset5=(ResultSet) stmt5.executeQuery(sql5);
while(rset5.next())
{
event = rset5.getString("event_type_desc");
}



}
catch(Exception ertd)
{
System.out.println(ertd);
}

Statement stmt0 =(Statement) MySqlConnection.conn().createStatement();
String sql0="select * from event_master,person_details,event_type where event_type.event_type_desc='"+j+"' AND person_details.person_name like'"+temp+"%'AND event_master.event_type_id=event_type.event_type_id AND event_master.person_id=person_details.person_id";

ResultSet rset0=(ResultSet) stmt0.executeQuery(sql0);


if (j.equals(event))
{

model = new DefaultTableModel(data, headers);
headers.add("Event ID");
headers.add("Person Name");
headers.add("Event Date");
headers.add("Event Message");

table=new JTable(data,headers);
table.setPreferredScrollableViewportSize(new Dimension(1300,350));
setColumnWidth(table.getColumnModel().getColumn(0), 500);
setColumnWidth(table.getColumnModel().getColumn(1), 500);
setColumnWidth(table.getColumnModel().getColumn(2), 500);
setColumnWidth(table.getColumnModel().getColumn(3), 500);

scroll = new JScrollPane(table);

scroll.setBounds(30, 50, 1400, 340);
scroll.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
getContentPane().add(scroll);


panels[ind].add(scroll) ;

for(int rowCount=table.getRowCount(); rowCount>0; rowCount--)
{
model.removeRow(rowCount-1);
}


data.clear();
while(rset0.next())

{
d=new Vector();
d.add(rset0.getString("event_id"));
d.add(rset0.getString("person_name"));
d.add(rset0.getString("event_on_date"));
d.add(rset0.getString("event_message"));
d.add("\n\n\n\n\n\n\n");
data.add(d);

}
table.addNotify();
table.setModel(model);
table.revalidate();
table.repaint();
table.setEnabled(false);



}
}
catch(Exception etr)
{
System.out.println(etr);
}
// Counter++;
// f++;
}
}

catch(Exception et)
{
System.out.println(et);
}
//
}

catch(Exception erd)
{
System.out.println(erd);
}

}


}

}



);
</code>
5 years ago

here i create array of JPanels.....If any doubts in understanding my code then please inform.....
5 years ago