Foros del Web » Programación para mayores de 30 ;) » Java »

JavaHelp

Estas en el tema de JavaHelp en el foro de Java en Foros del Web. Hola , estoy haciendo una ventana de ayuda con JavaHelp y me sale esto al hacer clic en el JMenuItem de ayuda, la primera vez ...
  #1 (permalink)  
Antiguo 03/08/2012, 04:34
 
Fecha de Ingreso: julio-2012
Mensajes: 65
Antigüedad: 11 años, 9 meses
Puntos: 0
JavaHelp

Hola , estoy haciendo una ventana de ayuda con JavaHelp y me sale esto al hacer clic en el JMenuItem de ayuda, la primera vez no, pero despues todo el tiempo. Además no me funciona con un clic, sino que tengo que dar dos clic.

Esto es el error:

javax.help.InvalidHelpSetContextException: Wrong context
at javax.help.DefaultHelpModel.setCurrentID(DefaultHe lpModel.java:130)
at javax.help.DefaultHelpModel.setCurrentID(DefaultHe lpModel.java:103)
at javax.help.Presentation.setCurrentID(Presentation. java:150)
at javax.help.DefaultHelpBroker.setCurrentID(DefaultH elpBroker.java:362)
at javax.help.CSH.displayHelp(CSH.java:756)
at javax.help.CSH.access$200(CSH.java:88)
at javax.help.CSH$DisplayHelpFromSource.actionPerform ed(CSH.java:1676)
at javax.swing.AbstractButton.fireActionPerformed(Unk nown Source)
at javax.swing.AbstractButton$Handler.actionPerformed (Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed (Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.AbstractButton.doClick(Unknown Source)
at javax.swing.plaf.basic.BasicMenuItemUI.doClick(Unk nown Source)
at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mou seReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent( Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(U nknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unkno wn Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilter s(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(U nknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarch y(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)


Esto es el código que utilizo para mi ventana:

private void ventanaAyuda() {
try {
// Carga el fichero de ayuda
File fichero = new File("src/help_set.hs");
URL hsURL = fichero.toURI().toURL();

// Crea el HelpSet y el HelpBroker
HelpSet helpset = new HelpSet(getClass().getClassLoader(), hsURL);
HelpBroker hb = helpset.createHelpBroker();


hb.enableHelpOnButton(ayudaItem, "aplicacion", helpset);
hb.enableHelpKey(f.getContentPane(), "ventana_principal",
helpset);
hb.enableHelpKey(f.getContentPane(), "ventana_secundaria",
helpset);

} catch (Exception e) {
e.printStackTrace();
}
}
  #2 (permalink)  
Antiguo 03/08/2012, 05:08
 
Fecha de Ingreso: julio-2012
Mensajes: 65
Antigüedad: 11 años, 9 meses
Puntos: 0
Respuesta: JavaHelp

Solucionado!!! :)
  #3 (permalink)  
Antiguo 03/08/2012, 11:19
Avatar de zero0097  
Fecha de Ingreso: abril-2010
Ubicación: México
Mensajes: 481
Antigüedad: 14 años
Puntos: 69
Respuesta: JavaHelp

Y como lo hiciste? digo porsi alguien tiene el mismo problema...
__________________
De nada, hay te encargo +1...
  #4 (permalink)  
Antiguo 24/02/2016, 12:47
 
Fecha de Ingreso: octubre-2004
Ubicación: Sevilla
Mensajes: 6
Antigüedad: 19 años, 6 meses
Puntos: 0
Respuesta: JavaHelp

Hola MariaJava.

Aunque este post túyo es antiguo tengo exactamente el mismo problema que tú comentas en tú post.

Estoy iniciandomente con JavaHelp y ya estoy desesperado.

¿Me podrías decir como lo solucionaste?

Un saludo.

Etiquetas: aplicaciones
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 07:08.