Witam a mianowicie staram się zrozumieć pewien kod i natrafiłem a taki oto kawałek
public int getType(ButtonPanel panel)
{
String s = panel.getSelection();
try
{
return JOptionPane.class.getField(s).getInt(null);
}
catch (Exception e)
{
return -1;
}
}
A więc o co chodzi z tym "class" funkcja ta ma zwracać stałe z klasy JOptionPane