As wushutwist said, you can implement as many interfaces as you want, eg
import java.awt.*;
import javax.swing.*;
import java.awt.event.*;
public class assignment extends JFrame implements KeyListener, MouseListener
{
public static void main(String args[])
{...
You could try something like this for setting the column sizes:
for(int id = 0; id < 2; id++)
{
column = tableName.getColumnModel().getColumn(id);
switch(id)
{
case 0: column.setPreferredWidth(10); break;
case 1: column.setPreferredWidth(30); break;
}
}
or you could just set...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.