Las vistas fueron movidas con tal de conseguir un solo frame de programa y realizar todo el flujo dentro de el

This commit is contained in:
Daniel Cortes
2019-02-19 14:22:41 -03:00
parent cef6b0f2e9
commit 08da94aba4
18 changed files with 675 additions and 533 deletions

View File

@@ -1,8 +1,10 @@
package danielcortes.xyz.controllers;
import danielcortes.xyz.controllers.actions.BasicAction;
import danielcortes.xyz.data.Configuration;
import javax.swing.*;
import java.awt.*;
class BaseController {
static void moveTo(JComponent origin, JComponent destiny) {
@@ -17,4 +19,14 @@ class BaseController {
target.getInputMap(JComponent.WHEN_FOCUSED).put(keyStroke, name);
target.getActionMap().put(name, action);
}
private void launchFrame(JComponent view, String title, Dimension d){
JFrame frame = new JFrame(title + ": " + Configuration.get("nombre_caja"));
frame.setContentPane(view);
frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
frame.setSize(d);
frame.setLocationRelativeTo(null);
frame.setVisible(true);
}
}