id stringlengths 36 36 | text stringlengths 1 1.25M |
|---|---|
1ac12353-3cf5-4772-a830-a18e0b279032 | public void paint(Graphics g) {
super.paint(g);
} |
4fc00744-d0b1-4bf4-bfb9-8fbe326f2aab | public void actionPerformed(ActionEvent ae) {
JButton currentlyClicked = (JButton)ae.getSource();
if (currentlyClicked instanceof Piece) {
Piece piece = (Piece)currentlyClicked;
currentlyClicked = piece;
}
lastClicked = (JButton)ae.getSource();
} |
bdc3a715-3b7f-4255-9f0f-53e7e0975cff | public boolean hasPiece(JButton btn) {
if (btn.getIcon() != null) {
System.out.println("True");
return true;
} else {
System.out.println("False");
return false;
}
} |
2e34d787-fc56-45b1-bedb-4b5291692c0d | public Knight(String color, String type, int x, int y, JButton[][] board) {
super(color, type, x, y, board);
} |
4c8113d5-9c77-46ec-a817-2927aa6b5f2d | public Team() {
} |
df37b681-3028-4945-be37-3a8e00105df4 | public void setTeam() {
} |
71ff668e-cf7a-4407-8e60-6d54f3e47c56 | public void getTeam() {
} |
631afe97-74ac-4ebf-9541-071a9be0c46a | public void switchTeam() {
} |
b1b627fa-a3d8-40dc-ab19-7ee31240d36f | public @Bean
Mongo mongo() throws UnknownHostException {
MongoOptions options = new MongoOptions();
options.setConnectionsPerHost(200);
options.setW(1);
return new Mongo(host, options);
} |
917e42b3-fd1f-47dd-9fe0-e0407c52f764 | public @Bean
MongoOperations mongoTemplate() throws UnknownHostException {
return new MongoTemplate(mongo(), schema);
} |
3934adf6-3fa5-4997-86ab-5478b9c279a4 | public DefaultFabric() {
} |
4bc63430-283d-4f5a-843b-5aad082cd72f | public Request getDummy() {
String id = UUID.randomUUID().toString();
Request request = new Request(id);
request.setPriority(priority);
request.setCpu(cpu);
request.setMemory(memory);
request.setNode(node);
request.setStorage(storage);
return request;
} |
7f7cb93e-48a5-4f37-9341-b8e4f62e14ed | public Request() {
} |
00cbc558-e8f5-40eb-afae-ba2206243fc6 | public Request(String id) {
this.id = id;
this.status = Status.CREATED;
this.creation_date = System.currentTimeMillis();
} |
bdb4ea95-cb07-434a-a484-05a99c63e199 | public String getId() {
return id;
} |
e944df1a-2cd9-4ad2-bc61-5e227cae41fc | public String getName() {
return name;
} |
438bce73-209c-49d5-b06d-017c13a0afc7 | public String getUser() {
return user_id;
} |
aab89717-2762-4d6a-83ce-53982e32fab0 | public int getPriority() {
return priority;
} |
67d1a83b-44a4-48fb-8940-053b4d27f4ee | public String getEmail() {
return email;
} |
035e2d23-bec8-4a33-85c0-fa6ad5570d26 | public long getTimeStamp() {
return creation_date;
} |
0628513a-1958-418e-a4c7-135d00c2b46d | public Status getStatus() {
return status;
} |
e52d2904-79e8-4ae6-b7a6-6136b1023b4a | public String getDescription() {
return description;
} |
61530654-3a3d-4125-abd5-af9cb855f1ec | public int getCpu() {
return cpu;
} |
bd59ee21-7610-49a6-82a5-ee29e71b2949 | public int getMemory() {
return memory;
} |
56d8f2a6-fb04-4030-9260-7e65fe022dc9 | public int getNode() {
return node;
} |
a2948a4d-1bd1-4b2a-908e-312a0918fd86 | public String getWalltime() {
return walltime;
} |
b1a072fb-85b7-495c-b354-a585e70ce65c | public Map<String, String> getEnv() {
return env;
} |
0c1a5fbc-176a-400f-9285-af71fbc8ffb1 | public String getInputArguments() {
return input_arguments;
} |
9667ab50-5073-4446-99bf-1dc0855ee346 | public int getStorage() {
return storage;
} |
6c85d5e3-23fc-4ae5-865e-e0bb5c99c733 | public String getBash() {
return bash;
} |
6657be47-69b1-4a0e-82d0-df75ee5211b9 | public String getHookStart() {
return hook_start;
} |
cdc1a7ed-4e5a-4156-9736-03c0183c395d | public String getHookEnd() {
return hook_end;
} |
ffb77e06-b3b2-40e9-b59b-b189f0db8603 | public void setId(String id) {
this.id = id;
} |
2a65ded3-3ca1-41a8-b11f-0a91f352fe0a | public void setName(String name) {
this.name = name;
} |
582f89df-9dda-437e-a804-bdf5516c4c01 | public void setUser(String user_id) {
this.user_id = user_id;
} |
823f5ecf-749a-4a3e-a2ee-d039dac89eb4 | public void setTimeStamp(long creation_date) {
this.creation_date = creation_date;
} |
beb268f1-64f0-4827-ab21-19c40c298663 | public void setPriority(int priority) {
this.priority = priority;
} |
8c9740b3-1e75-4327-9acd-b8f92b727bd2 | public void setEmail(String email) {
this.email = email;
} |
e7cb56e5-cec0-4938-9e25-672a1ce8489b | public void setStatus(Status status) {
this.status = status;
} |
d2ff7e89-08fd-4481-b91e-68e6e9985fd8 | public void setDescription(String description) {
this.description = description;
} |
c8899ba5-d741-43a1-95df-2c331c97c254 | public void setCpu(int cpu) {
this.cpu = cpu;
} |
ca82f08d-c6db-431c-baee-15f170afa081 | public void setMemory(int memory) {
this.memory = memory;
} |
377d3e1a-4486-4ddc-bf65-2c87ce94902f | public void setNode(int node) {
this.node = node;
} |
58ae2e66-5b08-47cc-8a93-57bc63269980 | public void setWalltime(String walltime) {
this.walltime = walltime;
} |
619c7e43-5c8f-442d-996a-0b15285c986b | public void setEnv(Map<String, String> env) {
this.env = env;
} |
40a6a0bf-21f4-4da9-918e-39006574244f | public void setInputArguments(String input_arguments) {
this.input_arguments = input_arguments;
} |
8ce8c2d0-64dd-4bce-9e19-e554b5681c2b | public void setStorage(int storage) {
this.storage = storage;
} |
74ae822d-fbea-4a15-9588-9ef46ec81edd | public void setBash(String bash) {
this.bash = bash;
} |
ded23084-c5eb-4314-9505-2a1f3fd908c6 | public void setHookStart(String hook_start) {
this.hook_start = hook_start;
} |
ef963bf8-d3d9-4c09-92e7-c3362a5df342 | public void setHookEnd(String hook_end) {
this.hook_end = hook_end;
} |
5684a989-b060-48d7-ba32-c7157a3d5803 | private Status(String name) {
this.name = name;
} |
24497edd-05e1-48d8-a75b-a0aff32fa9c1 | public Request getRequest(String id) {
Query query = new Query(Criteria.where("id").is(id));
return mongoTemplate.findOne(query, Request.class);
} |
bb53fab5-d033-4518-9326-014e05647631 | public Collection<Request> getRequests() {
Query query = new Query(Criteria.where("id").exists(true));
List<Request> requests = mongoTemplate.find(query, Request.class);
LOGGER.info(requests.size() + " requests found!");
return requests;
} |
a7feef25-4db2-4527-b08b-1d5e8b2166d7 | public Collection<Request> getRequests(Query query) {
query.fields().include("id").include("name").include("priority").include("description")
.include("user_id").include("creation_date").include("status").include("cpu").include("ram")
.include("node").include("walltime").include("storage").include("input_arguments").include("bash")
.include("hook_start").include("hook_end");
List<Request> requests = mongoTemplate.find(query, Request.class);
LOGGER.info(requests.size() + " requests found!");
return requests;
} |
2436c638-6407-4236-b2fa-66d4895ee6b6 | public void remove(String id) {
if (id.equals("all")) {
mongoTemplate.remove(Query.query(Criteria.where("id").exists(true)), Request.class);
LOGGER.info("Removed everything :3");
} else {
mongoTemplate.remove(mongoTemplate.findOne(new Query(Criteria.where("id").is(id)), Request.class));
LOGGER.info("Request with id = " + id + " removed!");
}
} |
b52a2b7e-64dc-420f-b45e-4a7feb67ea1f | public void save(Request request) {
if (!collectionExist()) {
LOGGER.info("Created collection!");
mongoTemplate.createCollection(Request.class);
}
Request existingRequest = getRequest(request.getId());
if (existingRequest != null) {
mongoTemplate.remove(existingRequest);
}
mongoTemplate.save(request);
LOGGER.info("Request: " + request);
} |
5a0b9d09-4b1d-439c-bee4-eb42e54bf591 | public boolean requestExists(String id) {
Request request = mongoTemplate.findOne(Query.query(Criteria.where("id").is(id)), Request.class);
return request != null;
} |
b5e6381f-393b-4fb2-8e1b-f230630a2ea2 | public boolean collectionExist() {
return mongoTemplate.collectionExists(Request.class);
} |
790812da-9501-4537-ba2f-1ecaf09f7432 | void setMongoTemplate(MongoOperations mongoTemplate) {
this.mongoTemplate = mongoTemplate;
} |
ec73d507-b88b-4c68-8f73-c9c0596f459b | public boolean collectionExist() {
return dao.collectionExist();
} |
6a1cec7f-2585-475b-bebe-b1ac09e66783 | public boolean requestExists(String id) {
return dao.requestExists(id);
} |
74ae3508-72a2-4990-a232-2ee4c835ee94 | public Request getRequest(String id) {
return dao.getRequest(id);
} |
0973f1e0-bf78-4ee8-aad6-fbf2401aaf4d | public Collection<Request> getRequests() {
return dao.getRequests();
} |
a09ffe79-aedd-4a54-8ca6-f015b1bbedb0 | public Collection<Request> getRequests(Query query) {
return dao.getRequests(query);
} |
8f74e8ed-f5a1-4c59-b9c1-c9a61a793114 | public void remove(String id) {
dao.remove(id);
} |
6ececbfe-3494-4542-b938-0fd3b2221a45 | public void save(Request request) {
dao.save(request);
} |
8c1f748b-5383-4498-8fd7-2796e9798810 | void setDao(RequestDAO dao) {
this.dao = dao;
} |
392d282f-bbea-42fa-b71d-5657f02f16b1 | @GET
@Path("/status")
public Response getSimpleAnswer() {
String result = "MAUI Rest service is working!\n";
return Response.status(200).entity(result).build();
} |
0f1b240c-31c2-4cff-9c72-b89d02e36529 | @GET
@Path("/requests")
@Produces(MediaType.APPLICATION_JSON)
public Response getRequests(@QueryParam("id") String id,
@QueryParam("name") String name,
@QueryParam("user_id") String user_id,
@QueryParam("priority") String priority,
@QueryParam("status") String status,
@QueryParam("sort") String sort,
@QueryParam("sortdir") String sortdir) {
Collection<Request> requests;
try {
Query query = new Query();
if (StringUtils.hasText(id)) {
query.addCriteria(Criteria.where("id").is(id));
}
if (StringUtils.hasText(name)) {
query.addCriteria(Criteria.where("name").regex(name));
}
if (StringUtils.hasText(user_id)) {
query.addCriteria(Criteria.where("user_id").is(user_id));
}
if (StringUtils.hasText(priority)) {
query.addCriteria(Criteria.where("priority").is(Integer.parseInt(priority)));
}
if (StringUtils.hasText(status)) {
query.addCriteria(Criteria.where("status").is(status.toUpperCase()));
}
if (!StringUtils.hasText(sort)) {
sort = "name";
}
if (sort.equals("id")) {
sort = "_id";
}
if (!StringUtils.hasText(sortdir)) {
sortdir = "asc";
}
query.with(new Sort(sortdir.equals("desc") ? Sort.Direction.DESC : Sort.Direction.ASC, sort));
requests = requestService.getRequests(query);
} catch (Exception e) {
LOGGER.log(Level.WARNING, e.getMessage());
return Response.status(500).build();
}
if (requests == null) {
return Response.status(500).build();
}
return Response.status(200).entity((new Gson()).toJson(requests)).build();
} |
156a4c2c-7dae-463e-949b-30c7a9aa4fc2 | @DELETE
@Path("/remove/{id}")
public Response removeRequest(@PathParam("id") String id) {
try {
requestService.remove(id);
} catch (Exception e) {
LOGGER.log(Level.WARNING, e.getMessage());
return Response.status(500).build();
}
return Response.status(200).build();
} |
9a675e03-ca68-440a-ab02-877d074b100d | @POST
@Path("/request")
@Produces(MediaType.APPLICATION_JSON)
public Response save(String jsonRequest) {
String jsonResponse;
JsonElement jsonElement = (new Gson()).fromJson(jsonRequest, JsonElement.class).getAsJsonObject().get("request");
if (jsonElement == null) {
return Response.status(500).entity("No JSON!").build();
}
JsonObject json = jsonElement.getAsJsonObject();
if (!json.has("user_id")) {
return Response.status(500).entity("No user provided!").build();
}
Request request;
if (json.has("id")) {
request = requestService.getRequest(json.get("id").getAsString());
} else {
request = defaultFabric.getDummy();
}
if (request == null) {
return Response.status(500).entity("No request with provided id exists!").build();
}
request.setUser(json.get("user_id").getAsString());
if (!json.has("name") && request.getName() == null) {
request.setName(request.getId());
} else {
request.setName(json.get("name").getAsString());
}
if (json.has("priority")) {
request.setPriority(json.get("priority").getAsInt());
}
if (json.has("email")) {
request.setEmail(json.get("email").getAsString());
}
if (json.has("cpu")) {
request.setCpu(json.get("cpu").getAsInt());
}
if (json.has("memory")) {
request.setMemory(json.get("memory").getAsInt());
}
if (json.has("storage")) {
request.setMemory(json.get("storage").getAsInt());
}
if (json.has("node")) {
request.setNode(json.get("node").getAsInt());
}
if (json.has("walltime")) {
request.setWalltime(json.get("walltime").getAsString());
}
if (json.has("storage")) {
request.setStorage(json.get("storage").getAsInt());
}
if (json.has("input_arguments")) {
request.setInputArguments(json.get("input_arguments").getAsString());
}
if (json.has("bash")) {
request.setBash(json.get("bash").getAsString());
}
if (json.has("file_url")) {
request.setBash(json.get("file_url").getAsString());
}
if (json.has("hook_start")) {
request.setHookStart(json.get("hook_start").getAsString());
}
if (json.has("hook_end")) {
request.setHookEnd(json.get("hook_end").getAsString());
}
if (json.has("description")) {
request.setDescription(json.get("description").getAsString());
} else {
request.setDescription(String.format("Name: %s", request.getName()));
}
requestService.save(request);
jsonResponse = (new Gson()).fromJson("{\"id\":\"" + request.getId() + "\"}", JsonElement.class).toString();
return Response.ok(jsonResponse).type(MediaType.APPLICATION_JSON).build();
} |
872cebe0-802d-46e6-b981-9c61d4c45a10 | public Monkey(String newName, String newGender, int newAge,
float newWeight, float newBodyLiftRatio) {
super(newName, newGender, newAge, newWeight, newBodyLiftRatio);
} |
060f3edf-5349-42b5-9e13-fb814f72af8e | public void talk1(){
System.out.println("Human " + runningDistance + " " + accelaration);
System.out.println("I walked " + runningDistance + " ft at a speed of "
+ speed + " ft per min. \n");
} |
35026ffe-e648-4bea-9c01-7beca2149adf | public Biped(String newName, String newGender, int newAge, float newWeight,
float newBodyLiftRatio){
name = newName;
gender = newGender;
age = newAge;
weight = newWeight;
bodyLiftRatio = newBodyLiftRatio;
} |
2b16f81d-aa4a-4d35-a8fa-9004a9642c48 | public void setAccelaration()
{
accelaration = 1 + (int) ( Math.random() * 10);
} |
e661755b-b541-48bf-a2ba-87a82d854499 | public int getAccelaration()
{
return accelaration;
} |
cb97e1b7-ecb4-468d-9b7c-eb369a29788f | void walk(){
runningDistance = runningDistance + accelaration;
//speed = runningDistance / time;
} |
ce236bcc-7b61-4bac-b993-52588a6ed4c2 | public void turn(){
runningDistance = runningDistance + accelaration + 10;
//speed = runningDistance/time;
} |
7d9aa6ae-5366-4c90-9c0f-6bf523cc47d2 | public void run(){
runningDistance = runningDistance + accelaration;
//speed = runningDistance/time;
} |
052bb971-554f-47bc-87bf-0969ec1d3a85 | public void collide(){
decrement = 1 + (int) ( Math.random() * 3);
accelaration = -decrement;
runningDistance = runningDistance + accelaration;
//speed = runningDistance/time;
} |
4c5b6be9-39f3-4c75-9f9c-91fe5e62bc5e | public void printSpeed(){
System.out.println("accelaration " + accelaration + " speed " + speed
+" running distance " + runningDistance);
} |
2a33dd44-da81-4cae-a57e-b01493fa33d7 | public void lift(int liftedObjectWeight){
bodyLiftRatio = liftedObjectWeight / weight;
} |
5ed94a5e-c23b-4de2-b987-6757d4809d6f | public float distance(){
return runningDistance;
} |
d0fcd9df-378a-455e-8ff2-1ec2f6a7f9e8 | public void talk(){//change to talk
System.out.println("This is " + name + " i am a " + age + " year old " + gender +"\n"
+ " I weigh " + weight +"lbs. my body lift ratio is " + bodyLiftRatio);
} |
535e59c5-6490-41a9-8972-38ee3de48fe4 | public Robot(String newName, String newGender, int newAge, float newWeight,
float newBodyLiftRatio) {
super(newName, newGender, newAge, newWeight, newBodyLiftRatio);
} |
0d86cae7-29df-4d3b-8d75-04ff51829ed9 | public void talk1(){
System.out.println("Human " + runningDistance + " " + accelaration);
System.out.println("I walked " + runningDistance + " ft at a speed of "
+ speed + " ft per min. \n");
} |
488d635e-a48a-42ad-9a7b-be00f03f0d68 | public Human(String newName, String newGender, int newAge, float newWeight,
float newBodyLiftRatio) {
super(newName, newGender, newAge, newWeight, newBodyLiftRatio);
} |
556ba067-cb54-4720-9c50-0145857ab875 | public void talk1(){
System.out.println("Human " + runningDistance + " " + accelaration);
System.out.println("I walked " + runningDistance + " ft at a speed of "
+ speed + " ft per min. \n");
} |
77843877-6098-48d0-b7d0-101de548ccb4 | public static void main( String[] args ){
Human human = new Human("Jack", "Male", 16/*Age*/, 125/*Weight*/,
2/*BLR*/);
Monkey monkey = new Monkey("Nala", "Female", 5, 90, 1);
Robot robot = new Robot("R2D2", "Android", 5, 235, 6);
human.setAccelaration();
human.getAccelaration();
human.talk();
monkey.talk();
robot.talk();
int n = 1 + (int) ( Math.random() * 4);
int lift = 1 + (int) ( Math.random() * 10);
int count = 1;
do{
if(count == 1)
{
//////////////HUMAN//////////////HUMAN///////
if ( n == 1)
{
System.out.println("H. Walked");
human.walk();
human.printSpeed();
}
else if(n == 2 )
{
System.out.println("H. Run");
human.run();
human.printSpeed();
}
else if (n == 3)
{
System.out.println("H. You crashed");
human.collide();
human.printSpeed();
}
else if (n == 4)
{
System.out.println("H.turn");
human.turn();
human.printSpeed();
}
if (lift == 7)
{
System.out.println("Lifted object");
}
n = 1 + (int) ( Math.random() * 4);
lift = 1 + (int) ( Math.random() * 4);
}
//////////////MONKEY///////////////////MONKEY
else if (count == 2)
{
if ( n == 1)
{
System.out.println("M. Walked");
monkey.walk();
monkey.printSpeed();
}
else if(n == 2 )
{
System.out.println("M. Run");
monkey.run();
monkey.printSpeed();
}
else if (n == 3)
{
System.out.println("M. You crashed");
monkey.collide();
monkey.printSpeed();
}
else if (n == 4)
{
System.out.println("M. turn");
monkey.turn();
monkey.printSpeed();
}
if (lift == 7)
{
System.out.println("Lifted object");
monkey.printSpeed();
}
n = 1 + (int) ( Math.random() * 4);
lift = 1 + (int) ( Math.random() * 4);
}
////////////////ROBOT????????????????ROBOT/////////////////////
else if (count == 3)
{
if ( n == 1)
{
System.out.println("R. Walked");
robot.walk();
robot.printSpeed();
}
else if(n == 2 )
{
System.out.println("R. Run");
robot.run();
robot.printSpeed();
}
else if(n == 3)
{
System.out.println("R. You crashed");
robot.collide();
robot.printSpeed();
}
else if (n == 4)
{
System.out.println("R. turn");
robot.turn();
robot.printSpeed();
}
if (lift == 7)
{
System.out.println("Lifted object");
}
n = 1 + (int) ( Math.random() * 4);
lift = 1 + (int) ( Math.random() * 4);
}
count++;
if (count > 3)//reset counter
{
count = 1;
}
}while( human.distance() < 100 || monkey.distance() < 100
|| robot.distance() < 100);
human.talk1();
monkey.talk1();
robot.talk1();
} |
939ea0f9-7b8a-4018-a5a6-1ffa9d3504f4 | public static void setUsuario(String Usuario) {
Conexion.Usuario = Usuario;
} |
ed4fa8bd-cd80-4a44-8caf-ac5b848e6312 | public static void setCadena(String Cadena) {
Conexion.Cadena = Cadena;
} |
c6c85d84-d091-470a-8908-a88ae6dda243 | public static void setClave(String Clave) {
Conexion.Clave = Clave;
} |
a0d193cd-65d0-41e2-be1f-1a6ab0e4bb26 | public static Conexion GetInstancia (){
if (Instancia == null){
Instancia=new Conexion( );
}
return Instancia;
} |
13b7b49c-d1e1-4644-bec7-d0cea4d49423 | public void Conectar (){
try {
ConexionDatos= DriverManager.getConnection(Cadena, Usuario, Clave);
}
catch(SQLException ex){
ex.getStackTrace();
}
} |
cb813e5a-d202-45d5-ad2f-13ecbcd81a29 | public void Desconectar () {
try{
ConexionDatos.close();
}
catch(SQLException ex){
ex.getStackTrace();
}
} |
c4f421e4-a404-4370-9e0e-1430a4e34897 | public void Ejecutar (String Cadena) throws SQLException{
try{
Sentencia= ConexionDatos.prepareStatement(Cadena);
Sentencia.executeUpdate();
}
catch(SQLException ex){
throw ex;
}
} |
93a32e74-2ece-49e1-9fbd-cc45f8ed5ac7 | public Cliente() {
initComponents();
} |
a9c2a057-6fa7-4c15-86f8-b0050e69d64a | @SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
txtcedula = new javax.swing.JTextField();
label1 = new java.awt.Label();
txtnombre = new javax.swing.JTextField();
label2 = new java.awt.Label();
txtdireccion = new javax.swing.JTextField();
label3 = new java.awt.Label();
txtcupo = new javax.swing.JTextField();
label4 = new java.awt.Label();
button1 = new java.awt.Button();
button2 = new java.awt.Button();
button3 = new java.awt.Button();
button4 = new java.awt.Button();
button5 = new java.awt.Button();
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
txtcedula.setName(""); // NOI18N
label1.setText("Cedula");
txtnombre.setText(" ");
label2.setText("Nombre");
label3.setText("Direccion");
txtcupo.setText(" ");
label4.setText("Cupo");
button1.setLabel("Grabar");
button1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
button1ActionPerformed(evt);
}
});
button2.setLabel("Modificar");
button2.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
button2ActionPerformed(evt);
}
});
button3.setLabel("Nuevo");
button3.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
button3ActionPerformed(evt);
}
});
button4.setLabel("Eliminar");
button4.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
button4ActionPerformed(evt);
}
});
button5.setLabel("Consultar");
button5.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
button5ActionPerformed(evt);
}
});
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addContainerGap()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addComponent(label1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(93, 93, 93)
.addComponent(txtcedula, javax.swing.GroupLayout.PREFERRED_SIZE, 129, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(layout.createSequentialGroup()
.addComponent(button3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(button2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(button1, javax.swing.GroupLayout.PREFERRED_SIZE, 65, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(button4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(button5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addGroup(layout.createSequentialGroup()
.addComponent(label2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(88, 88, 88)
.addComponent(txtnombre, javax.swing.GroupLayout.DEFAULT_SIZE, 129, Short.MAX_VALUE))
.addGroup(layout.createSequentialGroup()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(label4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(label3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(81, 81, 81)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(txtdireccion)
.addComponent(txtcupo)))))
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGap(21, 21, 21)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(label1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(txtcedula, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(label2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(txtnombre, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(label3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(txtdireccion, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(label4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(txtcupo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 32, Short.MAX_VALUE)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(button3, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(button2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(button1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(button4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(button5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(30, 30, 30))
);
pack();
}// </editor-fold>//GEN-END:initComponents |
75e5a502-3c83-492e-892d-14f3b96914c7 | public void actionPerformed(java.awt.event.ActionEvent evt) {
button1ActionPerformed(evt);
} |
7aafd042-604b-4c5c-81af-c3fa1da70294 | public void actionPerformed(java.awt.event.ActionEvent evt) {
button2ActionPerformed(evt);
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.