• Post Reply Bookmark Topic Watch Topic
  • New Topic

JList

 
Prashanth Bhanu
Ranch Hand
Posts: 110
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Friends,
I've problem in showing all the items which are populated in my JList.I've placed the JList inside the JScrollPane.But,Still not able to scrolldown to see all the items.
My Code is as Below.plz help me to find out where exactly the problem lies.(Is done on JDK1.3,i tried the available methods.I think i couldnt help my self).

//coded below for JScrollPane
private javax.swing.JScrollPane getJScrollAvlMaterial() {
if(jScrollAvlMaterial == null) {
jScrollAvlMaterial = new javax.swing.JScrollPane();
jScrollAvlMaterial.setViewportView(getListAvlMat());
jScrollAvlMaterial.setMinimumSize(
new java.awt.Dimension(145,75));
jScrollAvlMaterial.setPreferredSize(
new java.awt.Dimension(145,75));
jScrollAvlMaterial.setVerticalScrollBarPolicy(
javax.swing.JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);
jScrollAvlMaterial.setHorizontalScrollBarPolicy(
javax.swing.JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);

}
return jScrollAvlMaterial;
}

//Below code for List
private javax.swing.JList getListAvlMat() {
if(listAvlMat == null) {
listAvlMat = new javax.swing.JList();
listAvlMat.setMinimumSize(new java.awt.Dimension(141,65));
listAvlMat.setPreferredSize(new java.awt.Dimension(141,65));listAvlMat.setComponentOrientation(
java.awt.ComponentOrientation.LEFT_TO_RIGHT);
listAvlMat.setVisibleRowCount(2);
listAvlMat.setFixedCellHeight(-1);
listAvlMat.setFixedCellWidth(-1);
}
return listAvlMat;
}

Thanks in Advance
Prashanth
 
Craig Wood
Ranch Hand
Posts: 1535
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!