I have a menu in my application / interface Java Swing
, by clicking on the " Ayuda
" button I want the help system to open. What happens is that I get very minuscule by default and it does not come out centered, I would like to declare some measures both wide and high so that it can be displayed correctly.
I leave you a image of what happens: link
Code:
private void lanzarAyuda(){
try{
//Carga el fichero de ayuda.
File fichero = new File("sistema_ayuda" + File.separator + "helpset.hs");
URL hsURL = fichero.toURI().toURL();
//Crea el HelpSet.
HelpSet helpset = new HelpSet(getClass().getClassLoader(), hsURL);
HelpBroker hb = helpset.createHelpBroker();
//Mostrar el sistema de ayuda al pulsar F1.
hb.enableHelpOnButton(button_ayuda, "index", helpset);
hb.enableHelpKey(getRootPane(), "index", helpset);
}catch(Exception e){
e.printStackTrace();
}
}