0

I am trying the write the code of the number converter tool in 8085 simulator. I created Jtable called "noConTool with the size 2,8. Then I wrote the listener. However it does not work.

 private class hexaListener implements TableModelListener
{
    public void tableChanged(TableModelEvent e)
    {
        if(e.getColumn() == 0 && e.getFirstRow() == 1)
        {
             Object i = noConTool.getValueAt(1,0);
             String s = i.toString();
             int j = Integer.parseInt(s , 16);
             noConTool.setValueAt(Integer.toString(j), 1, 1);

        }

        else if(e.getColumn() == 1 && e.getFirstRow() == 1)
        {
            Object  k = noConTool.getValueAt(1,1);
            String p = k.toString();
            int u = Integer.parseInt(p);
            noConTool.setValueAt(Integer.toString(u), 1, 0);

        }
        else
            System.out.println("Thank you");



}
mKorbel
  • 109,525
  • 20
  • 134
  • 319

0 Answers0