JTable Problem (table does not show rows and columns)

Hi All,
What the table is suppose to do.
- Load information from a database
- put all the values in the first column
- in the second column put combobox (cell editor with numbers 1-12)
- the 3rd column put another combobox for something else
- the 4th column uses checkbox as an edit
The number of rows of the table should be equal to the number of
record from
the database. If not given it default to 20 (poor but ok for this)
The number of columns is 4.
But the table does not show any rows or
column when I put it inside a
JScrollPane (Otherwise it works).
Please help,
thanks in advance.
public class SubjectTable extends JTable {
* Comment for <code>serialVersionUID</code>
private static final long serialVersionUID = 1L;
/** combo for the list of classes */
protected JComboBox classCombo;
/** combo for the list of subjects */
protected JComboBox subjectsCombo;
/** combo for the list of grade */
protected JComboBox gradeCombo;
boolean canResize = false;
boolean canReorder = false;
boolean canSelectRow = false;
boolean canSelectCell = true;
boolean canSelectColumn = true;
// the row height of the table
int rowHeight = 22;
// the height of the table
int height = 200;
// the width of the table
int width = 300;
// the size of the table
Dimension size;
* Parameterless constructor. Class the one of the other constructors
to
* create a table with the a new <code>SubjectTableModel</code>.
public SubjectTable() {
this(new SubjectTableModel());
* Copy constructor to create the table with the given
* <code>SubjectTableModel</code>
* @param tableModel -
* the <code>SubjectTableModel</code> with which to
initialise
* the table.
SubjectTable(SubjectTableModel tableModel) {
setModel(tableModel);
setupTable();
* Function to setup the table's functionality
private void setupTable() {
clear();
// set the row hieght
this.setRowHeight(this.rowHeight);
// set the font size to 12
//TODO this.setFont(Settings.getDefaultFont());
// disble reordering of columns
this.getTableHeader().setReorderingAllowed(this.canReorder);
// disble resing of columns
this.getTableHeader().setResizingAllowed(this.canResize);
// enable the horizontal scrollbar
this.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
// disable row selection
setRowSelectionAllowed(this.canSelectRow);
// disable column selection
setColumnSelectionAllowed(this.canSelectColumn);
// enable cell selection
setCellSelectionEnabled(this.canSelectCell);
setPreferredScrollableViewportSize(getSize());
TableColumn columns = null;
int cols = getColumnCount();
for (int col = 0; col < cols; col++) {
columns = getColumnModel().getColumn(col);
switch (col) {
case 0:// subject name column
columns.setPreferredWidth(130);
break;
case 1:// grade column
columns.setPreferredWidth(60);
break;
case 2:// class room column
columns.setPreferredWidth(120);
break;
case 3:// select column
columns.setPreferredWidth(65);
break;
} // end switch
}// end for
// set up the cell editors
doGradeColumn();
doClassColumn();
//doSubjectColumn();
* Function to clear the table selection. This selection is different
to
* <code>javax.swing.JTable#clearSelection()</code>. It clears the
user
* input
public void clear() {
for (int row = 0; row < getRowCount(); row++) {
for (int col = 0; col < getColumnCount(); col++) {
if (getColumnName(getColumnCount() - 1).equals("Select")) {
setValueAt(new Boolean(false), row, getColumnCount() - 1);
}// if
}// for col
}// for row
* Function to set the cell renderer for the subjects column. It uses
a
* combobox as a cell editor in the teacher's subjects table.
public void doSubjectColumn() {
TableColumn nameColumn = getColumnModel().getColumn(0);
nameColumn.setCellEditor(new DefaultCellEditor(getSubjectsCombo()));
// set up the celll renderer
DefaultTableCellRenderer renderer = new DefaultTableCellRenderer();
renderer.setToolTipText("Click for drop down list");
nameColumn.setCellRenderer(renderer);
// Set up tool tip for the sport column header.
TableCellRenderer headerRenderer = nameColumn.getHeaderRenderer();
if (headerRenderer instanceof DefaultTableCellRenderer) {
((DefaultTableCellRenderer) headerRenderer)
.setToolTipText("Click the Name to see a list of choices");
}// end doSubjectsColumn----------------------------------------------
/** Function to set up the grade combo box. */
public void doGradeColumn() {
TableColumn gradeColumn = getColumnModel().getColumn(1);
gradeColumn.setCellEditor(new DefaultCellEditor(getGradeCombo()));
DefaultTableCellRenderer renderer = new DefaultTableCellRenderer();
renderer.setToolTipText("Click for drop down list");
gradeColumn.setCellRenderer(renderer);
// Set up tool tip for the sport column header.
TableCellRenderer headerRenderer = gradeColumn.getHeaderRenderer();
if (headerRenderer instanceof DefaultTableCellRenderer) {
((DefaultTableCellRenderer) headerRenderer)
.setToolTipText("Click the Grade to see a list of choices");
}// end doGradeColumn-------------------------------------------------
* Function to setup the Class room Column of the subjects
public void doClassColumn() {
// set the column for the classroom
TableColumn classColumn = getColumnModel().getColumn(2);
classColumn.setCellEditor(new DefaultCellEditor(getClassCombo()));
DefaultTableCellRenderer renderer = new DefaultTableCellRenderer();
renderer.setToolTipText("Click for drop down list");
classColumn.setCellRenderer(renderer);
// Set up tool tip for the sport column header.
TableCellRenderer headerRenderer = classColumn.getHeaderRenderer();
if (headerRenderer instanceof DefaultTableCellRenderer) {
((DefaultTableCellRenderer) headerRenderer)
.setToolTipText("Click the Class to see a list of choices");
}// end doClassColumn--------------------------------------------------
* Function to get the size of the table
* @return Returns the size.
public Dimension getSize() {
if (this.size == null) {
this.size = new Dimension(this.height, this.width);
return this.size;
* Function to set the size of the table
* @param dim
* The size to set.
public void setSize(Dimension dim) {
if (dim != null) {
this.size = dim;
return;
* Function to create/setup the class room comboBox. If the comboBox
is
* <code>null</code> a nwew one is created else the functon returns
the
* function that was returned initially.
* @return Returns the classCombo.
private JComboBox getClassCombo() {
if (this.classCombo == null) {
this.classCombo = new JComboBox();
// fill up the class name combo
ArrayList classRooms = new ArrayList();
try {
//TODO classRooms = Settings.getDatabase().getClassRooms();
for (int i = 0; i < 10; i++) {
String string = new String("Class");
string += i;
if (!classRooms.isEmpty()) {
classRooms.trimToSize();
for (int i = 0; i < classRooms.size(); i++) {
this.classCombo.addItem(classRooms.get(i));
} catch (Exception e) {
e.printStackTrace();
return this.classCombo;
* Function to create/setup the subjects comboBox. If the comboBox is
* <code>null</code> a nwew one is created else the functon returns
the
* function that was returned initially.
* @return Returns the subjectsCombo.
private JComboBox getSubjectsCombo() {
if (this.subjectsCombo == null) {
this.subjectsCombo = new JComboBox();
try {
ArrayList subjects = loadSubjectsFromDatabase();
if (!subjects.isEmpty()) {
Iterator iterator = subjects.iterator();
while (iterator.hasNext()) {
// create a new subject instance
//TODO Subject subct = new Subject();
// typecast to subject
//TODO subct = (Subject) iterator.next();
String name = (String) iterator.next();
// add this subject to the comboBox
//TODO this.subjectsCombo.addItem(subct.getName());
subjectsCombo.addItem(name);
}// end while
}// end if
else {
JOptionPane.showMessageDialog(SubjectTable.this,
"Subjects List Could Not Be Filled");
System.out.println("Subjects List Could Not Be Filled");
} catch (Exception e) {
e.printStackTrace();
return this.subjectsCombo;
* Function to load subjects from the <code>Database</code>
* @return Returns the subjects.
private ArrayList loadSubjectsFromDatabase() {
// list of all the subject that the school does
ArrayList subjects = new ArrayList();
try {
//TODO to be removed later on
for (int i = 0; i < 10; i++) {
String string = new String("Subject");
string += i;
subjects.add(i, string);
// set the school subjects
//TODO subjects = Settings.getDatabase().loadAllSubjects();
} catch (Exception e1) {
e1.printStackTrace();
return subjects;
* Function to create/setup the grade comboBox. If the comboBox is
* <code>null</code> a nwew one is created else the functon returns
the
* function that was returned initially.
* @return Returns the gradeCombo.
private JComboBox getGradeCombo() {
if (this.gradeCombo == null) {
this.gradeCombo = new JComboBox();
// fill with grade 1 to 12
for (int i = 12; i > 0; i--) {
this.gradeCombo.addItem(new Integer(i).toString());
return this.gradeCombo;
public static void main(String[] args) {
try {
UIManager.setLookAndFeel(new Plastic3DLookAndFeel());
System.out.println("Look and Feel has been set");
} catch (UnsupportedLookAndFeelException e) {
// TODO Auto-generated catch block
e.printStackTrace();
SubjectTableModel model = new SubjectTableModel();
int cols = model.getColumnCount();
int rows = model.getRowCount();
Object[][] subjects = new Object[rows][cols];
for (int row = 0; row < rows; row++) {
subjects[row][0] = new String("Subjectv ") + row;
}//for
model.setSubjectsList(subjects);
SubjectTable ttest = new SubjectTable(model);
JFrame frame = new JFrame("::Table Example");
JScrollPane scrollPane = new JScrollPane();
scrollPane.setViewportView(ttest);
frame.getContentPane().add(scrollPane);
frame.pack();
frame.setVisible(true);
**************************************END
TABLE******************************
----------------------------THE TABLE
MODEL----------------------------------
* Created on 2005/03/21
* SubjectTableModel
package com.school.academic.ui;
import javax.swing.table.AbstractTableModel;
* Class extending the <code>AbstractTableModel</code> for use in
creating the
* <code>Subject</code>s table. In addition to the implemented methods
of
* <code>AbstractTableModel</code> The class creates a model that has
initial
* values - the values have their own <code>getter</code> and
* <code>setter</code> methods - but can still be used for values that
a user
* chooses.
* <p>
* @author Khusta
public class SubjectTableModel extends AbstractTableModel {
* Comment for <code>serialVersionUID</code>
private static final long serialVersionUID = 3257850978324461113L;
/** Column names for the subjects table */
String[] columnNames = { "Subject", "Grade", "Class Room",
"Select" };
/** Array of objects for the subjects table */
Object[][] subjectsList;
private int totalRows = 20;
protected int notEditable = 0;
* Parameterless constructor.
public SubjectTableModel() {
// TODO initialise the list
// add column to the default table model
this.subjectsList = new
Object[getTotalRows()][getColumnNames().length];
* Copy constructor with the <code>subjectList</code> to set
* @param subjects
public SubjectTableModel(Object[][] subjects) {
this(0, null, subjects, 0);
* Copy constructor with the initial number of row for the model
* @param rows -
* the initial rows of the model
* @param cols -
* the initial columns of the model
* @param subjects -
* the initial subjects for the model
* @param edit - the minimum number of columns that must be
uneditable
public SubjectTableModel(int rows, String[] cols, Object[][]
subjects, int edit) {
// set the initial rows
setTotalRows(rows);
// set the column names
setColumnNames(cols);
// set the subjectlist
setSubjectsList(subjects);
//set not editable index
setNotEditable(edit);
* Function to get the total number of columns in the table
* @return int -- the columns in the table
public int getColumnCount() {
if (this.subjectsList == null) {
return 0;
return getColumnNames().length;
* Function to get the total number of rows in the table
* @return int -- the rows in the table
public int getRowCount() {
if (this.subjectsList == null) {
return 0;
return this.subjectsList.length;
* Function to get the name of a column in the table.
* @param col --
* the column to be named
* @return String -- the column in the table
public String getColumnName(int col) {
if (getColumnNames()[col] != null) {
return getColumnNames()[col];
return new String("...");
* Function to get the value of the given row.
* @param row --
* the row of the object.
* @param col --
* the col of the object.
* @return Object -- the value at row, col.
public Object getValueAt(int row, int col) {
return getSubjectsList()[row][col];
* Function to return the data type of the given column.
* @param c --
* the column whose type must be determined.
* @return Class -- the type of the object in this col.
public Class getColumnClass(int c) {
if (getValueAt(0, c) != null) {
return getValueAt(0, c).getClass();
return new String().getClass();
* Function to put a value into a table cell.
* @param value --
* the object that will be put.
* @param row --
* the row that the object will be put.
* @param col --
* the col that the object will be put.
public void setValueAt(Object value, int row, int col) {
* TODO: Have a boolean value to determine whether to clear or
to set.
* if true clear else set.
if (value != null) {
if (getSubjectsList()[0][col] instanceof Integer
&& !(value instanceof Integer)) {
try {
getSubjectsList()[row][col] = new
Integer(value.toString());
fireTableCellUpdated(row, col);
} catch (NumberFormatException e) {
* JOptionPane .showMessageDialog( this., "The \""
+
* getColumnName(col) + "\" column accepts only
values
* between 1 - 12");
return;
System.out.println("Value = " + value.toString());
System.out.println("Column = " + col + " Row = " + row);
// column = Grade or column = Select
switch (col) {
case 2:
try {
// TODO
if (Boolean.getBoolean(value.toString()) == false
&& getValueAt(row, 0) != null
&& getValueAt(row, 1) != null
&& getValueAt(row, 2) != null) {
// subjectsList[row][col + 1] = new
Boolean(true);
System.out.println("2. false - Updated...");
* this.subjectListModel.add(row,
* this.subjectsList[row][0] + new String(" -
") +
* this.subjectsList[row][2]);
} catch (ArrayIndexOutOfBoundsException exception) {
exception.printStackTrace();
break;
case 3:
if (Boolean.getBoolean(value.toString()) == false
&& getValueAt(row, 0) != null
&& getValueAt(row, 1) != null
&& getValueAt(row, 2) != null) {
System.out.println("3. If - Added...");
getSubjectsList()[row][3] = new Boolean(true);
this.subjectListModel.addElement(this.subjectsList[row][0] +
* new String(" - ") + this.subjectsList[row][2]);
// subjectListModel.remove(row);
fireTableCellUpdated(row, col);
fireTableDataChanged();
// this.doDeleteSubject();
} else if (Boolean.getBoolean(value.toString()) ==
true
&& getValueAt(row, 0) != null
&& getValueAt(row, 1) != null
&& getValueAt(row, 2) != null) {
setValueAt("", row, col - 1);
setValueAt("", row, col - 2);
setValueAt("", row, col - 3);
System.out.println("3. Else - Cleared...");
// this.subjectListModel.remove(row);
break;
default:
break;
}// end switch
getSubjectsList()[row][col] = value;
fireTableCellUpdated(row, col);
fireTableDataChanged();
}// end if
}// end
* Function to enable edition for all the columns in the table
* @param row --
* the row that must be enabled.
* @param col --
* the col that must be enabled.
* @return boolean -- indicate whether this cell is editble or
not.
public boolean isCellEditable(int row, int col) {
if (row >= 0
&& (col >= 0 && col <= getNotEditable())) {
return false;
return true;
* Function to get the column names for the model
* @return Returns the columnNames.
public String[] getColumnNames() {
return this.columnNames;
* Function to set the column names for the model
* @param cols
* The columnNames to set.
public void setColumnNames(String[] cols) {
// if the column names are null the default columns are used
if (cols != null) {
this.columnNames = cols;
* Function to get the rows of subjects for the model
* @return Returns the subjectsList.
public Object[][] getSubjectsList() {
if (this.subjectsList == null) {
this.subjectsList = new
Object[getTotalRows()][getColumnNames().length];
return this.subjectsList;
* Function to set the subjects list for the model
* @param subjects
* The subjectsList to set.
public void setSubjectsList(Object[][] subjects) {
// if the subject list is null create a new one
// using default values
if (subjects == null) {
this.subjectsList = new
Object[getTotalRows()][getColumnNames().length];
return;
this.subjectsList = subjects;
* Function to get the total number of rows for the model. <b>NB:
</b> This
* is different to <code>
getRowCount()</code>.<code>totalRows</code>
* is the initial amount of rows that the model must have before
data can be
* added.
* @return Returns the totalRows.
* @see #setTotalRows(int)
public int getTotalRows() {
return this.totalRows;
* Function to set the total rows for the model.
* @param rows
* The totalRows to set.
* @see #getTotalRows()
public void setTotalRows(int rows) {
// if the rows are less than 0 the defaultRows are used
// set getTotalRows
if (rows > 0) {
this.totalRows = rows;
* Function to get the number of columns that is not editble
* @return Returns the notEditable.
public int getNotEditable() {
return this.notEditable;
* Function to set the number of columns that is not editable
* @param notEdit The notEditable to set.
public void setNotEditable(int notEdit) {
if (notEdit < 0) {
notEdit = 0;
this.notEditable = notEdit;
----------------------------END TABLE MODEL----------------------------------

I hope you don't expect us to read hundreds of lines of unformatted code? Use the "formatting tags" when you post.
Why are you creating your own TableModel? It looks to me like the DefaultTableModel will store you data. Learn how to use JTable with its DefaultTableModel first. Then if you determine that DefaultTableModel doesn't provide the required functionality you can write your own model.

Similar Messages

  • WPF: How to make the first column does not show row separator and Left column separator in DataGrid?

    Our WPF application uses DataGrid.
    One of request is that first column of DataGrid does not show row separator and also does not show Left column separator. So it looks like the first column does not belong to the DataGrid. However, when select a row, the cell of first column still get selected.
    How do we make it? Thx!
    JaneC

    Hi Magnus,
    Thanks for replying our question and provide your solution!
    Your solution works by setting "HorizontalGridLinesBrush" and "VerticalGridLinesBrush" to {x:Null} in the DataGrid style and modify "CellStyle" in first column as following:
    <DataGridTextColumn MinWidth="32"
    Binding="{Binding CellName}"
    CanUserReorder="False"
    CanUserSort="False"
    Header="Cell}"
    IsReadOnly="true" >
    <DataGridTextColumn.CellStyle>
    <Style TargetType="DataGridCell">
    <Setter Property="IsEnabled" Value="False"></Setter>
    <Setter Property="Template">
    <Setter.Value>
    <ControlTemplate TargetType="{x:Type DataGridCell}">
    <Border BorderThickness="0" BorderBrush="{x:Null}"
    Background="{Binding Background, RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}" Margin="-1">
    <Grid Background="{TemplateBinding Background}" VerticalAlignment="Center" Height="42">
    <ContentPresenter VerticalAlignment="Center"/>
    </Grid>
    </Border>
    </ControlTemplate>
    </Setter.Value>
    </Setter>
    </Style>
    </DataGridTextColumn.CellStyle>
    </DataGridTextColumn>
    We found another way to achieve it by using DataGridRowHeader. The good way to use DataGridRowHeader is that we do not need to make the first column ReadOnly (click on first column does not select whole row anymore). Select RowHeader in a row will select
    whole row. Move scroll bar horizontally, the row header still keep in visible area.
    <Style TargetType="{x:Type DataGridRowHeader}" x:Key="dataGridRowHeaderStyle">
    <Setter Property="VerticalContentAlignment" Value="Center" />
    <Setter Property="HorizontalAlignment" Value="Center" />
    <Setter Property="Height" Value="42" />
    <Setter Property="SeparatorBrush" Value="{x:Null}" />
    <Setter Property="FontSize" Value="16" />
    <Setter Property="Template">
    <Setter.Value>
    <ControlTemplate TargetType="{x:Type DataGridRowHeader}">
    <Grid>
    <Border x:Name="rowHeaderBorder"
    BorderThickness="0"
    Padding="3,0,3,0"
    Background="{Binding Background, RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"
    BorderBrush="{x:Null}">
    <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
    </Border>
    </Grid>
    </ControlTemplate>
    </Setter.Value>
    </Setter>
    </Style>
    <DataGrid>
    <DataGrid.RowHeaderStyle>
    <Style TargetType="DataGridRowHeader" BasedOn="{StaticResource dataGridRowHeaderStyle}">
    <Setter Property="Content" Value="{Binding CellName}" />
    <Setter Property="Width" Value="35"/>
    </Style>
    </DataGrid.RowHeaderStyle>
    </<DataGrid>
    JaneC

  • I have my iphone activated and working since 3days, i purchased it from ebay with 1year warranty, when i check the serial number from Apple store at Bangalore Forum mall, they say that it does not show anything and 'OUT OF WARRANTY'.

    I have my iphone4 activated and working since 3days, i purchased it from ebay with 1year warranty, when i check the serial number from Apple store at Bangalore Forum mall, they say that it does not show anything and 'OUT OF WARRANTY'.
    Now i have a problem in it, all icons just shake and system hangs, needs restarting.

    You need to go back to the person you bought it from. Sounds like they may have sold you phone that is not as described.
    Did you check the warranty status before purchasing it?

  • On windows 8.1 charms bar does not show up and the touch functionality is also degraded

    upgraded my elitepad 900 to windows 8.1 . after this the charms bar does not show up and the touch functionality is also degraded while playing games. i believe i need the latest synaptics gesture suite.  Cannot find it. Please help.

    I am sorry, but to get your issue more exposure I would suggest posting it in the commercial forums since this is a commercial product. You can do this HERE.
    HP ElitePad 900 G1 Tablet Support
    TwoPointOh
    I work on behalf of HP
    Please click “Accept as Solution ” if you feel my post solved your issue, it will help others find the solution.
    Click the “Kudos, Thumbs Up" on the bottom to say “Thanks” for helping!

  • IPad 3, iOS 8.1 (current), does not show" Handoff and Suggested Apps"

    iPad 3, iOS 8.1 (current), does not show" Handoff and Suggested Apps" in my "Settings / General" tab.  I've turned it off, restarted to no avail.  Any suggestions?

    The iPad 3 does not support Handoff or Continuity.
    http://support.apple.com/kb/HT6337
    "Handoff is supported by the following iOS devices and requires iOS 8. Instant Hotspot requires one of these iPhone or iPad devices with cellular connectivity and iOS 8.1. Instant Hotspot also requires Personal Hotspot service through your carrier.
    Phone 5 or later
    iPhone 4s (sharing iPhone calls only)
    iPad (4th generation), iPad Air, iPad Air 2
    iPad mini, iPad mini with Retina display, iPad mini 3
    iPod touch (5th generation)"

  • How do i recover my purchased movies on itunes. the icloud does not show them and i have contacted apple twice before about this issue

    how do i recover my purchased movies on itunes. the icloud does not show them and i have contacted apple twice before about this issue

    Not all movies qualify for download on demand from iTunes in the Cloud, the rights may be reserved by the content provider and can vary by region. What response have you had from iTunes Store support?
    If you have still have the computer they were on it might be possible to extract the hard drive, mount it in an external drive bay and recover the content from it.
    tt2

  • Does Coloring Of Rows and Column in Query effect the Performance of Query

    Hi to all,
    Does Coloring of Rows and Column in Query via WAD or Report designer , will effect the performance of query.
    If yes, then how.
    What are the key factor should we consider while design of query in regards of Query performance.
    I shall ne thankful to you for this.
    Regards
    Pavneet Rana

    There will not be any significance perofrmance issue for Colouring the rows or columns...
    But there are various performance parameters which should be looked into while designing a query...
    Hope this PPT helps you.
    http://www.comeritinc.com/UserFiles/file/tips%20tricks%20to%20speed%20%20NW%20BI%20%202009.ppt
    rgds, Ghuru

  • Plz. help,table does not show value for one field

    hi all,
    i have a really strange problem , i have a string field in access database that contains the date and time value,this field for some strange reason does not show in my table created through html,
    i tried all combination(arranging the fields) ,renaming it w/o help, it shows the value using out.println(but then why is it not showing me in the table???)
    plz. help ASAP.
    the code is as under
    <HTML>
    <HEAD><TITLE> LOGGED IN ok</TITLE> </HEAD>
    <BODY bgcolor = "yellow">
    <%@ page import = "java.sql.*" %>
         <%! // declaring variables
    String s = "";
    java.sql.ResultSet rs=null,rs1=null,rs2=null;
    java.sql.Connection con;
    java.sql.Statement stmt,stmt1;
    String empId = "",compid ="",calltype ="",probheader="",probdescription ="",probcomment ="",priority ="",a="";
    %>
    Following are the pending complaints ..
         <TABLE BORDER=1 CELLSPACING=0 CELLPADDING=0 width="100%">
         <TR>
         <TD> ComplainD </TD>
    <TD> ComplainId </TD>     
    <TD> ProbHeader </TD>     
    <!--
    <TD> ProblemDescription </TD>     
    <TD> Problem Comments </TD>     
    -->
    </TR>
         <%
         try
         Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
         java.sql.Connection con = java.sql.DriverManager.getConnection("jdbc:odbc:Driver={Microsoft Access Driver (*.mdb)};" +"DBQ=c:/vishal/HelpDesk.mdb;DriverID=22;READONLY=false","","");
         //java.sql.Connection con = java.sql.DriverManager.getConnection("jdbc:odbc:Portal");
              java.sql.Statement stmt = con.createStatement(java.sql.ResultSet.TYPE_SCROLL_INSENSITIVE,java.sql.ResultSet.CONCUR_READ_ONLY);
              s = "select * from Complains";
         java.sql.ResultSet rs = stmt.executeQuery(s);               
                        while(rs.next())
                        //getting data from database
                                                           empId = rs.getString("EmpId");                    // out.print(" " + empId);
              compid = rs.getString("ComplainId");
              // out.print(" " + compid);
              calltype = rs.getString("CallType");
              // out.print(" " + calltype);
                        a = rs.getString("Complaindate"); //problem with this field
    out.print(a); // prints value
              %>               
                        <TR>      
                        <TD> <%=compid %> </TD>
                        <TD> <%=calltype %> </TD>     
                        <TD <%=a %> </TD>
                                       </TR>
    <%
                        }//while loop          
         %>
         </TABLE>     
         <%                
         }//try
              catch(Exception ep)
              out.println(ep);
              System.exit(1);
    %>
    </BODY>
    </HTML>
    value in database is as follows :-
    Complaindate
    5/18/2003 1:30:27 PM
    5/18/2003 7:32:43 PM
    5/18/2003 7:34:02 PM
    5/18/2003 7:49:19 PM
    5/18/2003 7:50:27 PM
    5/18/2003 10:49:42 PM
    5/18/2003 10:58:24 PM
    thanking u ,plz ask if any further clarifications

    Hi
    I am seeing nothing wrong with ur code..
    what about "view source" result.....plz check with that...
    whether u r getting all the trs and tds...
    revert back on this Issue..
    Mars Amutha

  • Trying to sync photos from iTunes (via iPhoto) to ipad and iPhone. The  Photo tab does not show up and no sync occurs

    Trying to sync photos from iphoto to ipad and iphone.  Photo tab does not show up in itunes under devices. 

    I had a similar problem (https://discussions.apple.com/message/24525903#24525903)
    The solution in my case was to start iPhoto and let it update the library, even thu itunes was set up to sync with Aperture.

  • Organizer does not show filename and extension viewing photo

    Windows 7
    Photoshop Elements 8
    I previously had Photoshop Elements 8 on a computer with Windows XP that died. My photos, thankfully, were on an external hard drive. My new computer has Windows 7. I installed Photoshop Elements 8 on it and imported my photos.
    Previously when viewing a photo in Organizer in the largest size obtainable by clicking on the thumbnail, the photo would show tags and the filename with extension. Now, It does not show the filename and I have to click properties and get the little window that opens to show me the name. I couldn't find anything in preferences to set the filename option. Can someone please tell me how to do it?
    Thanks, Eva

    Hi,
    Under the View menu, ensure that Details & Show file names are both checked
    Brian

  • When using the iphone 6 Plus. I use iMessage it is terribly slow to attach photo or take a photo the app does not show camera and slow... like 2 mins at least.

    When using the iphone 6 Plus. I use iMessage and then attach a photo or take a photo... the app does not show the camera fully or even to attach a photo does not work. I have about 8-9000 phones and like 10 short videos in there but it is incredibly slow and almost unable. I have the 128GB iPhone 6 Plus with 46 gb still available. I think this should not be so slow with so much memory still available. Please help. I am using 8.1.2. Yes I have set up the phone as a new phone. Apple store even reformatted this iphone 6 plus 2 months ago but it is still terribly slow Thanks

    Hey Bender1031,
    Thanks for the question, I can definitely understand how frustrating this issue may be with a brand new phone. Great troubleshooting so far by already attempting a restart and reset. If the issue persists, let’s try restoring your device and updating to the latest software (iOS 8.0.2):
    Back up and restore your iOS device with iCloud or iTunes
    http://support.apple.com/kb/HT1766
    iOS: How to back up your data and set up your device as a new device
    http://support.apple.com/kb/HT4137
    After erasing and setting up as a new device, your device is now in a factory configuration. Test to determine if erasing and setting up as a new device resolved the issue. Content on the device may have caused unexpected behavior.
    - If the issue is still present, you may want to contact Apple Support.
    - If the issue is now resolved, sync one type of content at a time back to the device. For example, if you had an issue playing music, add songs from iTunes and confirm they will play. If your contacts weren't loading successfully, add the contacts back. After each sync, test to see if the issue has returned.
    Thanks,
    Matt M.

  • Installed a RAID card in my Dell Inspiron 3847. However, the RAID BIOS does not show up and I cannot install Windows 7 to it.

    That is basically a summary of the problem The Dell Inspiron 3847 does not come with RAID, so I tried installing a PCI-express 1x RAID card. However, the RAID BIOS never shows up. The HDDs show up when I install the RAID controller driver in Windows 7 setup, but I cannot install Windows 7. I am using an IOCrest SY-PEX40008 RAID card with a Silicon Image Sil3124 chipset.
    I tried pressing the hotkeys for the RAID BIOS listed in the card's manual, but it seems to just cause bootup to freeze. BIOS also does not seem to detect the RAID card HDDs as boot options.

    %AppData% is the name of an environment variable.
    On XP that variable points to C:\Documents and Settings\&lt;user&gt;\Application Data\
    "Application Data" in XP/Win2K and "AppData" in Vista/Windows 7 are hidden folders, use %APPDATA% in the File name field
    See http://kb.mozillazine.org/Show_hidden_files_and_folders
    You can use Help > Troubleshooting Information > Profile Directory > Open Containing folder
    See also [[Using the Troubleshooting Information page]]

  • I've downloaded itunes on my computer, but the iTunes store does not show up and HTML and the links do not work?

    I've successfully downloaded iTunes to my PC.  Every function appears to work, however when accessing iTunes store it does not come up in HTML format and when I click a link it times out.

    Hi Augstiner57, I have the same problem.  Did you figure it out?  Mine seems to have happened after I updated Apple TV. Now it doesn't recognize my Home Sharing even though on my MacBook is it turned on.
    I am running an old OS  though (Leopard) so  I am wondering if I need to upgrade.

  • ITunes Store does not show author and "album artwork" of my podcast

    Although all information is available - the itunes store does not mention the author and "album artwork" of my podcast - if podcast is downloaded, album artwork is shown...
    How can I add the informatin (especially that author is not "unknown" anymore)
    http://itunes.apple.com/de/podcast/nie-mehr-schuchtern-der-podcast/id404201576?i =88951302

    For reference, you feed is at http://kontaktvoll.de/tinc?key=r5FOIixD
    This is not a valid podcast feed for iTunes. It's missing the 'itunes declaration' in the second line. The top two lines of your feed should read as follows:
    <?xml version="1.0" encoding="UTF-8"?>
    <rss xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" version="2.0">
    Without that, iTunes cannot read the 'itunes' tags which are necessary to carry some of the information, and which in any case are missing from your feed. The author name is carried in the 'itunes:author' tag and the image in the 'itunes:image' tag.
    This page contains a basic sample feed so you can see what it should look like and how these tags are formed:
    http://www.wilmut.org.uk/pc
    If you are hand-writing this feed it's a good idea to put returns in after each closing tag, as in the sample. At the moment most of your feed is on one line and this makes it very difficult to read when looking for problems, particularly as you add more episodes.

  • HT1363 screen on my classic iPod does not show anything and cannot restore

    Brand new iPod Classic and the screen has gone blank...unable to restore, some error message pops up, not pleased with this product as this is the third one in a year! Any ideas how to rectify this problem?

    Connect the iPod to the computer and try to restore the iPod via iTunes.
    If iTunes does not see the iPod, place th iPod in recovery mode and then try to restore the iPod.  For recovery mode see:
    iPhone and iPod touch: Unable to update or restore
    If that does not solve the problem you may have a hardware problem and an appointment at the Genius Bar of an Apple store is inorder.  I doo not like that the corner gets hot.

Maybe you are looking for

  • HT201077 my daughter and I share the same apple id but can we have separate photo stream

    My daughter and I share the same apple ID for music and apps. Is there any way for us to have separate photo streams. We do not want to share photos.

  • Creating web transaction for sub screen modulr pool

    Hi Experts, I am working with SRM . I have crated a module pool program which contains one main screen (9000) and two subscreens (9001, 9002 ). Also one subscreen area ( SUBSCR ). I have created two buttons in the main screen , button1 and button2. W

  • 8008 Error when trying to download movies from iTunes

    I've searched Google and the discussion boards but no one seems to have a fix for the 8008 error when trying to download movies in iTunes. I have the latest version of iTunes, my Mac Mini is up to date with all of it's patches, I've tried deleting th

  • Videos playing but not viewable... Quicktime?

    Any iTunes videos I have are suddenly not viewable (the screen has lines throuigh it and multi-colors). The audio is fine. I tried uninstalling and then reinstalling QuickTime to no avail. Now I'm wondering if I need to uninstall iTunes and Quicktime

  • ISE 1.1.1 falsely Reports High memory useage

    Hi all, we have an ISE vmware deployment and nearly once a day, the ISE triggers an alert and sends me email alerts avising that the system is running low on memory. however when we look at the resource useage in VMware Vsphere client, it shows that