if (mechView.isValid()) { ta.setText(mechView.getMechReadout()); } else { ta.setText("Sorry, can only display mechs."); }
ta.setText(mechView.getMechReadout());
    public void mechReadout() {        if (lisEntities.getSelectedIndex() == -1) {            return;        }        Entity entity = client.game.getEntity(entityCorrespondance[lisEntities.getSelectedIndex()]);        MechView mechView = new MechView(entity);        TextArea ta = new TextArea();	ta.setEditable(false);        if (mechView.isValid()) {            ta.setText(mechView.getMechReadout());        } else {            ta.setText("Sorry, can only display mechs.");        }        final Dialog dialog = new Dialog(client.frame, "Mech Quick View", false);        Button btn = new Button("Ok");        dialog.add("South", btn);        btn.addActionListener(new java.awt.event.ActionListener() {                public void actionPerformed(ActionEvent e) {                        dialog.setVisible(false);                }        });        dialog.add("Center", ta);        dialog.setLocation(client.frame.getLocation().x + client.frame.getSize().width/2 - dialog.getSize().width/2,                    client.frame.getLocation().y + client.frame.getSize().height/5 - dialog.getSize().height/2);        dialog.setSize(300, 450);        dialog.show();    }