BCA

AJAVA LAB

PROGRAM 1 PROGRAM 2 PROGRAM 3 PROGRAM 4 PROGRAM 5 PROGRAM 6

PART B

PROGRAM 7 PROGRAM 8 PROGRAM 9 PROGRAM 10 PROGRAM 11 PROGRAM 12 PROGRAM 13 PROGRAM 14 PROGRAM 15 . . .

OUTPUT :
 


 
Question :
3. Write a java program to display BCA 5 th sem timetable using JTable class of swing.


File name : Program3



      import javax.swing.*;    
    import javax.swing.event.*;  
    public class Program3 {    
         Program3(){  
                JFrame f = new JFrame("BCA 5th sem :Time table  ");  

                String data[][]={ {"MONADY"," ","DC","OS","CN","OS"},    
                                   {"TUESDAY","CN","OS","WEBLAB","WEBLAB","WEBLAB"},    
                                   {"WEDNESDAY","WEB","AJAVA", "AJAVALAB","AJAVALAB","AJAVALAB"},
                                     {"THURSDAY" ,"DC","OS","CN","OS"},    
                                   {"FRIDAY","CN","OS","WEBLAB","WEBLAB","WEBLAB"},    
                                   { "SATURDAY","AJAVA","CN","AJAVALAB","AJAVALAB","AJAVALAB"}  }; 
   
                                String column[]={"DAY","9- 10","10-11","11-12","12-1pm","1pm-2pm" };         
               
            final JTable jt=new JTable(data,column);    
                 jt.setBounds(30,40,200,300);          
                      
                 f.add(jt);          
             f.setSize(600,600);    
                f.setVisible(true);  
              }  

              public static void main(String[] args) {    
                     new Program3();    
                 }    
            }