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 Mensajes
Páginas: [1] 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 ... 48
1  Programación / Java / Re: Imagen en tabla y en java class en: 15 Junio 2018, 19:24 pm
Ahh no me di cuenta de eso.

Pero para que sepas getClass no es estatico, si no es una función de objeto.
2  Programación / Java / Re: Imagen en tabla y en java class en: 15 Junio 2018, 18:27 pm
Ahí entra el diseño de la clase y del objeto que vas a usar.

Si la variable quieres que sea única para toda la clase usas
Código:
private static Manzana manzana;

Si la variable es solo para un objeto no usas el modificador static
Código:
private Manzana manzana;

Tienes que ver bien si te acomoda usar static o no, depende únicamente de tu diseño. Si diseñas mal la clase te traerá problemas a futuro. Pero ya con el tiempo te darás cuenta cuando usar o no static.

Saludos
3  Programación / Java / Re: Imagen en tabla y en java class en: 15 Junio 2018, 17:36 pm
Por lo que creo estás llamando una variable no estatica (o variable de objeto), desde una función estatica (función de clase).

Conoces la diferencia entre una función estatica y no estatica?
4  Programación / Java / Re: Imagen en tabla y en java class en: 15 Junio 2018, 17:04 pm
Así =P
Código
  1. public class Geneuno extends javax.swing.JFrame
  2. {
  3.    DefaultTableModel Tabla1 = new DefaultTableModel();
  4.    Icon Acero = new ImageIcon(getClass().getResource("../Ima/Acero.gif"));
  5. private void CbSelMetActionPerformed(java.awt.event.ActionEvent evt)
  6. {
  7. if (CbSelMet.getSelectedItem().equals("Metal"))
  8. {
  9. Tabla1.addRow(new Object []{"",new JLabel(Acero),"",new JLabel(Acero)});
  10. }
  11. }
  12. }
  13.  

Yo miro este código, y no noto ningún drama. Incluso lo probé en netbeans y nada.
Si puedes pegar el código del error y un mini ejemplo del código donde lo quieres usar sería útil para ayudarte.

PS: Ignore el hecho que no está definida la variable CbSelMet, supongo que la tienes definida más abajo en tu clase.
5  Programación / Java / Re: Imagen en tabla y en java class en: 15 Junio 2018, 15:31 pm
Te agradecería si el código lo pones dentro del tag de código para su mejor compresión.
6  Programación / Java / Re: Controlar eventos del mouse en: 15 Junio 2018, 15:30 pm
Y has investigado algo?

Porque no me he topado con nada aún.

Por cierto, yo solo te responderé por aquí si encuentro algo, no te voy a contactar por otro medio.
7  Programación / Java / Re: Controlar eventos del mouse en: 14 Junio 2018, 16:07 pm
¿Que planeas hacer?
8  Programación / PHP / Re: Webservice, problema el retornar un dato con un SoapServer(PHP) en: 3 Octubre 2014, 03:37 am
Ya no recuerdo bien aqui está el WSDL xD
Código
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <wsdl:definitions
  3.    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
  4.    xmlns:tns="http://localhost/gameCommunity"
  5.    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
  6.    xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl"
  7.    xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
  8.    xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
  9.    targetNamespace="http://localhost/gameCommunity">
  10.    <wsdl:types>
  11.        <xsd:schema targetNamespace="http://localhost/gameCommunity" elementFormDefault="qualified">            
  12. <xsd:complexType name="Target">
  13. <xsd:sequence>
  14. <xsd:element name="id" type="xsd:int"/>
  15. <xsd:element name="name" type="xsd:string"/>
  16. <xsd:element name="contador" type="xsd:int"/>
  17. <xsd:element name="max_contador" type="xsd:int"/>
  18. </xsd:sequence>
  19. </xsd:complexType>
  20. <xsd:complexType name="Achievement">
  21. <xsd:sequence>
  22. <xsd:element name="id" type="xsd:int"/>
  23. <xsd:element name="name" type="xsd:string" />
  24. <xsd:element name="targets" minOccurs="1" maxOccurs="10" type="tns:Target" />
  25. </xsd:sequence>
  26. </xsd:complexType>  
  27. <xsd:element name="ArrayOfAchievement">
  28. <xsd:complexType>
  29. <xsd:sequence>
  30. <xsd:element maxOccurs="1200" minOccurs="1" name="item" type="tns:Achievement"/>
  31. </xsd:sequence>
  32. </xsd:complexType>
  33. </xsd:element>
  34. <xsd:element name="UnlockCode">
  35. <xsd:simpleType>
  36. <xsd:restriction base="xsd:string">
  37. <xsd:enumeration value="unlock_false" />
  38. <xsd:enumeration value="unlock_true" />
  39. <xsd:enumeration value="unlock_complete" />                
  40. </xsd:restriction>
  41. </xsd:simpleType>
  42. </xsd:element>
  43. <xsd:element name="UnlockParam">
  44.                <xsd:complexType>
  45.                    <xsd:sequence>                        
  46. <xsd:element minOccurs="1" name="session" type="xsd:string" />
  47. <xsd:element minOccurs="1" name="logro" type="xsd:int" />
  48. <xsd:element minOccurs="1" name="objetivo" type="xsd:int" />
  49. <xsd:element minOccurs="1" name="veces" type="xsd:int" />
  50.                    </xsd:sequence>
  51.                </xsd:complexType>
  52.            </xsd:element>
  53. </xsd:schema>
  54.  
  55. <xsd:element name="Status">
  56. <xsd:simpleType>
  57. <xsd:restriction base="xsd:string">
  58. <xsd:enumeration value="status_ok" />
  59. <xsd:enumeration value="status_wrong_user" />
  60. <xsd:enumeration value="status_enabled_server" />
  61. <xsd:enumeration value="status_server_temporarily_disabled" />
  62. <xsd:enumeration value="status_server_off" />
  63. <xsd:enumeration value="status_irc_server_is_disabled" />
  64. <xsd:enumeration value="status_requires_an_update" />
  65. </xsd:restriction>
  66. </xsd:simpleType>
  67. </xsd:element>
  68. <xsd:element name="AuthParam">
  69. <xsd:complexType>
  70. <xsd:sequence>
  71. <xsd:element minOcurrs="1" name="username" type="xsd:string" />
  72. <xsd:element minOcurrs="1" name="game" type="xsd:string" />
  73. <xsd:element minOcurrs="1" name="ver" type="xsd:int" />
  74. </xsd:sequence>
  75. </xsd:complexType>
  76. </xsd:element>
  77. <xsd:element name="Auth">
  78. <xsd:complexType>
  79. <xsd:sequence>
  80. <xsd:element minOcurrs="1" name="nonce" type="xsd:string" />
  81. <xsd:element minOcurrs="1" name="info" type="xsd:string" />
  82. <xsd:element minOcurrs="1" name="status" type="tns:Status" />
  83. </xsd:sequence>
  84. </xsd:complexType>
  85. </xsd:element>
  86. <xsd:element name="LoginParam">
  87.                <xsd:complexType>
  88.                    <xsd:sequence>
  89.                        <xsd:element minOccurs="1" name="username" type="xsd:string"/>
  90.                        <xsd:element minOccurs="1" name="password" type="xsd:string"/>
  91. <xsd:element minOccurs="1" name="authcode" type="xsd:string"/>
  92.                    </xsd:sequence>
  93.                </xsd:complexType>
  94.            </xsd:element>          
  95. <xsd:element name="Session">
  96.                <xsd:complexType>
  97.                    <xsd:sequence>
  98. <xsd:element minOccurs="1" name="session_key" type="xsd:string"/>
  99. <xsd:element minOccurs="1" name="time_expire" type="xsd:int"/>
  100. <xsd:element minOccurs="1" name="time_last_login" type="xsd:int"/>
  101. <xsd:element minOccurs="1" name="ip_last_login" type="xsd:string"/>
  102. <xsd:element minOccurs="1" name="game_achievement_score" type="xsd:int"/>
  103. <xsd:element minOccurs="1" name="total_achievement_score" type="xsd:int"/>
  104. <xsd:element minOccurs="1" name="game_highscore" type="xsd:int"/>
  105.                    </xsd:sequence>
  106.                </xsd:complexType>
  107.            </xsd:element>
  108.    </wsdl:types>
  109.  
  110. <wsdl:message name="AuthInput">
  111. <wsdl:part name="parameters" element="tns:AuthParam" />
  112. </wsdl:message>
  113. <wsdl:message name="AuthOutput">
  114. <wsdl:part name="parameters" element="tns:Auth" />
  115. </wsdl:message>
  116. <wsdl:message name="LoginInput">
  117. <wsdl:part name="parameters" element="tns:LoginParam" />    
  118. </wsdl:message>
  119. <wsdl:message name="LoginOutput">
  120. <wsdl:part name="parameters" element="tns:Session" />
  121. </wsdl:message>
  122.  
  123. <wsdl:message name="UnlockInput">
  124. <wsdl:part name="parameters" element="tns:UnlockParam" />
  125. </wsdl:message>
  126. <wsdl:message name="UnlockOutput">
  127. <wsdl:part name="parameters" element="tns:UnlockCode" />
  128. </wsdl:message>
  129.    <wsdl:message name="AchievementsInput">
  130. <wsdl:part name="parameters" element="tns:Session" />
  131. </wsdl:message>
  132. <wsdl:message name="AchievementsOutput">
  133. <wsdl:part name="parameters" element="tns:ArrayOfAchievement" />
  134. </wsdl:message>
  135. <wsdl:message name="AchievementsImageInput">
  136.        <wsdl:part name="parameters" element="tns:AchievementsImageParam" />        
  137. </wsdl:message>
  138. <wsdl:message name="AchievementsImageOutput">
  139. <wsdl:part name="parameters" element="tns:ArrayOfData" />
  140. </wsdl:message>  
  141.  
  142.    <wsdl:portType name="AuthPortType">
  143. <wsdl:operation name="Auth">
  144.            <wsdl:input message="tns:AuthInput" wsaw:Action="http://localhost/gameCommunity/auth"/>
  145.            <wsdl:output message="tns:AuthOutput" wsaw:Action="http://localhost/gameCommunity/auth"/>
  146.        </wsdl:operation>  
  147.        <wsdl:operation name="Login">
  148.            <wsdl:input message="tns:LoginInput" wsaw:Action="http://localhost/gameCommunity/login"/>
  149.            <wsdl:output message="tns:LoginOutput" wsaw:Action="http://localhost/gameCommunity/login"/>
  150.        </wsdl:operation>      
  151.    </wsdl:portType>
  152.  
  153. <wsdl:portType name="AchievementPortType">
  154. <wsdl:operation name="Unlock">
  155. <wsdl:input message="tns:UnlockInput" wsaw:Action="http://localhost/gameCommunity/unlock"/>
  156. <wsdl:output message="tns:UnlockOutput" wsaw:Action="http://localhost/gameCommunity/unlock" />
  157. </wsdl:operation>
  158. <wsdl:operation name="Achievements">
  159. <wsdl:input message="tns:AchievementsInput" wsaw:Action="http://localhost/gameCommunity/achievements"/>
  160. <wsdl:output message="tns:AchievementsOutput" wsaw:Action="http://localhost/gameCommunity/achievements"/>
  161. </wsdl:operation>
  162. <wsdl:operation name="AchievementsImage">
  163. <wsdl:input message="tns:AchievementsImageInput" wsaw:Action="http://localhost/gameCommunity/achievementsImage"/>
  164. <wsdl:output message="tns:AchievementsImageOutput" wsaw:Action="http://localhost/gameCommunity/achievementsImage"/>
  165. </wsdl:operation>
  166. </wsdl:portType>
  167.  
  168.    <wsdl:binding name="AuthBinding" type="tns:AuthPortType">
  169.        <soap:binding transport="http://schemas.xmlsoap.org/soap/http"/>
  170.        <wsdl:operation name="Auth">
  171.            <soap:operation soapAction="http://localhost/gameCommunity/auth" style="document"/>
  172. <wsdl:input>
  173.                <soap:body use="literal"/>
  174.            </wsdl:input>
  175.            <wsdl:output>
  176.                <soap:body use="literal"/>
  177.            </wsdl:output>
  178.        </wsdl:operation>
  179. <wsdl:operation name="Login">
  180.            <soap:operation soapAction="http://localhost/gameCommunity/login" style="document"/>
  181. <wsdl:input>
  182.                <soap:body use="literal"/>
  183.            </wsdl:input>
  184.            <wsdl:output>
  185.                <soap:body use="literal"/>
  186.            </wsdl:output>
  187.        </wsdl:operation>
  188.    </wsdl:binding>
  189.  
  190. <wsdl:binding name="AchievementBinding" type="tns:AchievementPortType">
  191. <soap:binding transport="http://schemas.xmlsoap.org/soap/http"/>
  192. <wsdl:operation name="Unlock">
  193. <soap:operation soapAction="http://localhost/gameCommunity/unlock" style="document"/>
  194. <wsdl:input>
  195. <soap:body use="literal" />
  196. </wsdl:input>
  197. <wsdl:output>
  198. <soap:body use="literal" />
  199. </wsdl:output>
  200. </wsdl:operation>
  201. <wsdl:operation name="Achievements">
  202. <soap:operation soapAction="http://localhost/gameCommunity/achievements" style="document"/>
  203. <wsdl:input>
  204. <soap:body use="literal" />
  205. </wsdl:input>
  206. <wsdl:output>
  207. <soap:body use="literal"/>
  208. </wsdl:output>
  209. </wsdl:operation>
  210. <wsdl:operation name="AchievementsImage">
  211. <soap:operation soapAction="http://localhost/gameCommunity/achievementsImage" style="document"/>
  212. <wsdl:input>
  213. <soap:body use="literal"/>
  214. </wsdl:input>
  215. <wsdl:output>
  216. <soap:body use="literal"/>
  217. </wsdl:output>
  218. </wsdl:operation>    
  219. </wsdl:binding>
  220.    <wsdl:service name="GameCommunity">
  221.        <wsdl:port name="AuthPort" binding="tns:AuthBinding">
  222.            <soap:address location="http://localhost/gameCommunity/Auth.php"/>
  223.        </wsdl:port>
  224. <wsdl:port name="AchievementPort" binding="tns:AchievementBinding">
  225.            <soap:address location="http://localhost/gameCommunity/achievement.php"/>
  226.        </wsdl:port>
  227.    </wsdl:service>
  228. </wsdl:definitions>
  229.  
Ahí está xD
9  Programación / Java / Re: leer archivo en: 23 Junio 2014, 01:12 am
Citar
The method printf(String,Object[])in the type printStream is not applicable for the arguments (String, int)

Que raro deberia funcionarte, en fin mejor usa esto y no te compliques tanto.
println(""+car);

Saludos!
10  Programación / Java / Re: [Java] BingHackTool 1.0 en: 14 Marzo 2014, 16:24 pm
Vende mejor tu programa, la información es algo ambigua.

¿Que hace exactamente?
Páginas: [1] 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 ... 48
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines