elhacker.net cabecera Bienvenido(a), Visitante. Por favor Ingresar o Registrarse
¿Perdiste tu email de activación?.

 

 


Tema destacado: Guía actualizada para evitar que un ransomware ataque tu empresa


  Mostrar Temas
Páginas: 1 [2]
11  Programación / Java / contentPane:java.lang.IllegalArgumentException en: 22 Noviembre 2009, 01:44 am
Estaba con el VE del Eclipse y derrepente se me quedo todo el Jframe en blanco con una I de informacion arriba del todo con e siguiente mensaje:

Citar
contentPane:java.lang.IllegalArgumentException(IWAV0167E access by methodname(getContentPane) (not by Proxy) requires a receiver.)

Lo curioso es que puedo compilarlo sin problemas, solo que no veo los Jtext y jButtons que habia agregado ... alguna idea de donde puede estar el problema?.. dejo el código completo a continuación... si me pueden ayudar bárbaro, gracias ...
Código:
package IU;

import java.awt.BorderLayout;

import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.JFrame;
import javax.swing.JTextField;
import java.awt.Rectangle;
import javax.swing.JLabel;
import java.awt.Dimension;
import javax.swing.JButton;
import java.awt.Point;
import javax.swing.JPasswordField;

import dominio.Administrador;

import servicio.Fachada;
import utilidades.Consola;

public class IUAgregarAdm extends JFrame {

private static final long serialVersionUID = 1L;
private JPanel jContentPane = null;
private JTextField jNombre = null;
private JTextField jApellido = null;
private JTextField jUser = null;
private JLabel jLabel = null;
private JLabel jLabel1 = null;
private JLabel jLabel2 = null;
private JLabel jPass = null;
private JButton jAceptar = null;
private JButton jCancel = null;
private JPasswordField jPasswordField = null;

private Fachada f;
private JLabel jPassC = null;
private JPasswordField jPasswordField1 = null;

/**
* This is the default constructor
*/
public IUAgregarAdm(Fachada v) {
super();
initialize();
v = f;
}

/**
* This method initializes this
*
* @return void
*/
private void initialize() {
this.setSize(256, 220);
this.setResizable(false);
this.setContentPane(getJContentPane());
this.setTitle("Agregar administrador");
}

/**
* This method initializes jContentPane
*
* @return javax.swing.JPanel
*/
private JPanel getJContentPane() {
if (jContentPane == null) {
jPassC = new JLabel();
jPassC.setBounds(new Rectangle(19, 113, 88, 16));
jPassC.setText("Confirma Pass:");
jPass = new JLabel();
jPass.setBounds(new Rectangle(19, 92, 82, 16));
jPass.setText("Password:");
jLabel2 = new JLabel();
jLabel2.setBounds(new Rectangle(19, 69, 38, 16));
jLabel2.setText("User:");
jLabel1 = new JLabel();
jLabel1.setBounds(new Rectangle(19, 50, 59, 16));
jLabel1.setText("Apellido:");
jLabel = new JLabel();
jLabel.setBounds(new Rectangle(19, 28, 64, 16));
jLabel.setText("Nombre:");
jContentPane = new JPanel();
jContentPane.setLayout(null);
jContentPane.add(getJNombre(), null);
jContentPane.add(getJApellido(), null);
jContentPane.add(getJUser(), null);
jContentPane.add(jLabel, null);
jContentPane.add(jLabel1, null);
jContentPane.add(jLabel2, null);
jContentPane.add(jPass, null);
jContentPane.add(getJAceptar(), null);
jContentPane.add(getJCancel(), null);
jContentPane.add(getJPasswordField(), null);
jContentPane.add(jPassC, null);
jContentPane.add(getJPasswordField1(), null);
}
return jContentPane;
}

/**
* This method initializes jNombre
*
* @return javax.swing.JTextField
*/
private JTextField getJNombre() {
if (jNombre == null) {
jNombre = new JTextField();
jNombre.setBounds(new Rectangle(110, 27, 119, 20));
}
return jNombre;
}

/**
* This method initializes jApellido
*
* @return javax.swing.JTextField
*/
private JTextField getJApellido() {
if (jApellido == null) {
jApellido = new JTextField();
jApellido.setBounds(new Rectangle(110, 49, 119, 20));
}
return jApellido;
}

/**
* This method initializes jUser
*
* @return javax.swing.JTextField
*/
private JTextField getJUser() {
if (jUser == null) {
jUser = new JTextField();
jUser.setBounds(new Rectangle(110, 71, 119, 20));
}
return jUser;
}

/**
* This method initializes jAceptar
*
* @return javax.swing.JButton
*/
private JButton getJAceptar() {
if (jAceptar == null) {
jAceptar = new JButton();
jAceptar.setBounds(new Rectangle(144, 153, 83, 25));
jAceptar.setText("Aceptar");
jAceptar.setToolTipText("");
jAceptar.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
                    crearAdm();
}
});
}
return jAceptar;
}

private boolean crearAdm() {
String nombre; String apellido; String user; String pass;

if (this.noHayErrores()) {
nombre = this.jNombre.getText();
apellido = this.jApellido.getText();
user = this.jUser.getText();
pass = this.jPasswordField.getText();

Administrador adm = new Administrador(nombre,apellido,user,pass);
if (f.agregarAdmin(adm)) {
return true;
}
}
return false;
}

/**
* This method initializes jCancel
*
* @return javax.swing.JButton
*/
private JButton getJCancel() {
if (jCancel == null) {
jCancel = new JButton();
jCancel.setBounds(new Rectangle(22, 153, 83, 25));
jCancel.setText("Salir");
}
return jCancel;
}

/**
* This method initializes jPasswordField
*
* @return javax.swing.JPasswordField
*/
private JPasswordField getJPasswordField() {
if (jPasswordField == null) {
jPasswordField = new JPasswordField();
jPasswordField.setBounds(new Rectangle(110, 93, 119, 20));
}
return jPasswordField;
}

/**
* This method initializes jPasswordField1
*
* @return javax.swing.JPasswordField
*/
private JPasswordField getJPasswordField1() {
if (jPasswordField1 == null) {
jPasswordField1 = new JPasswordField();
jPasswordField1.setBounds(new Rectangle(110, 115, 119, 20));
}
return jPasswordField1;
}

public boolean noHayErrores() {

if (this.jNombre.getText().trim().isEmpty()) {
JOptionPane.showMessageDialog(this, "Falta ingresar el Nombre");
return false;
}
if (this.jApellido.getText().trim().isEmpty()) {
JOptionPane.showMessageDialog(this, "Falta ingresar el Apellido");
return false;
}
if (this.jUser.getText().trim().isEmpty()) {
JOptionPane.showMessageDialog(this,
"Falta ingresar el Nombre de Usuario");
return false;
}

if (this.jPasswordField.getText().trim().isEmpty()) {
JOptionPane.showMessageDialog(this,
"Falta ingresar el Password");
return false;
}

if (this.jPasswordField1.getText().trim().isEmpty()) {
JOptionPane.showMessageDialog(this,
"Falta ingresar la confirmacion del Password");
return false;
}

if (!this.jPasswordField1.getText().equals(this.jPasswordField.getText())) {
JOptionPane.showMessageDialog(this,
"Los Passwords ingresados no coinciden");
return false;
}

/*
* /if (modelo.buscarJugadorxNom(this.Usuario.getText())) {
* JOptionPane.showMessageDialog(this,
* "Error, ya existe un usuario con el mismo nombre."); return false; }/
*/

return true;

}

} // @jve:decl-index=0:visual-constraint="10,10"
/code]
12  Programación / PHP / Verificador de dominios de .com.uy en PHP .. en: 9 Noviembre 2008, 17:37 pm
Bueno no se si sera el mejor lugar aca para plantear esto pero..

La cosa es que estoy programando en PHP un verificador de dominios para Uruguay (una chotada) y ya tengo prontos para verificar extensiones .net.uy y .org.uy por medio del servidor whois (sepe.rau.edu.uy) ... pero el problema es que para los .com.uy no funciona y me dice que tengo que consultarlo en la web de Antel .. bueno eso hice y probe con dns.antel.net.uy whois.antel.net.uy y nada despues me fijo y me entero que el puerto 43 no lo tienen abierto, asi que decidi escanear el rango entero de esa IP busca del puerto 43 y no tuve suerte... alguien sabe alguna forma o la manera de buscar ese server whois para los .com.uy?
Y antes que me digan... pense en mandar la consulta armando una cabecera post por http a la web de antel directamente usando fsockopen al 80 y ereg despues pero me embola.. a ver si alguien se sabe el IP asi me ahorro trabajo ^^.
Thanks...
Páginas: 1 [2]
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines