public class Proof extends JWizardPanel{
String generatedString = "";
public Proof(JWizardComponents wizardComponents) {
super(wizardComponents);
init();
}
private void init() {
JButton btnNodo = new JButton("Eliminar nodo");
btnNodo.setBounds(154, 757, 97, 25);
this.add(btnNodo);
JButton btnNewButton_1 = new JButton("Eliminar Arista");
btnNewButton_1.setBounds(392, 757, 97, 25);
this.add(btnNewButton_1);
setLayout(null);
}
public void update() {
DirectedSparseGraph<String, String> g = new DirectedSparseGraph<>();
VisualizationImageServer<String, String> vv = new VisualizationImageServer<>(new CircleLayout<>(g),
new Dimension(800, 800));
Transformer<String, String> transformer = new Transformer<String, String>() {
@Override
public String transform(String arg0) {
return arg0;
}
};
vv.getRenderContext().setVertexLabelTransformer(transformer);
this.add(vv);
}
}
首先出现图表,然后当我通过鼠标时出现我的 Jbuttons,为什么?
我真的不知道为什么,我试图将我的 Jbuttons 放在 update() 中,并且发生的情况完全相同,你能帮帮我吗?
我正在使用 Jung 库制作图表并使用 JWizard 制作向导