Whoever programmed this code was very devious. They were masters at hiding
buttons, at least visually (graphically).
I know the location of the panel where they should reside.
I know the button that opens/closes the panel where they reside.
But you can't see the buttons on the panel in the source.
How many buttons are we talking?
At least 14.
Technically they might not be buttons.
All I know is that in the app, when you click on these icons/buttons,
forms open up where you can do other things.
If it were you, how would you go about trying to find these hidden buttons
so you could get at their code?
I know the names that have been given to them.
At least when the program is running.
They're there for all to see.
Fred Kleinschmidt wrote:If they are indeed buttons, just search all of the source code for "new JButton" or "addActionListener", or for methods named "actionPerformed" If they aren't buttons (the code is capturing button presses and determining where the press is), look for "addMouseListener" or "mousePressed". (It will be harder to find these things if the code is Java8 and the author used lambdas).
Thanks Fred you gave me a bit more to chew on/look for.
I did find a load of mouseListeners/mousePressed events but they were in JasperReports, not the area I am looking for.
There are tons of ActionListeners in the code.
I think I can confidently say now that the panel does not house buttons, but some other animal rather.
The items are two-part. They consist of an icon and a label to the right. If you click on either one, or even a little above or below each,
a new window will open up.
I will attach an image of the panel I am trying to find/get at in the code.
Also, as you can see in the attachment, when you hover near an item, the text becomes underlined, to show the selection.
Maybe it will give you some clues as to what else I can search for?
Just a side note. The program does allow the casual user to kind of get at the menu.
If you go into the Maintenance/Resources menu in the program you can _show/hide various items on the menu
we are looking at. But that's the extent of it.
BTW, that half button you see in my attached image is one that I added to the code.
Knute Snortum wrote:It's still a shot in the dark, but try searching for hyperlinks: <a href=
Thanks Knute. Nothing turned up with that search.
I'm sure I'll eventually crack this.
I'll show you how close, yet so far I am currently.
As you can see in the menu above each item consists of an icon and a text label.
I know where to change the icons and text labels!
Yes I found where they reside.
However no code to go along with it.
Menu icons can be changed in a Menu.Root.txt file accessible inside the program itself
by typing in the name of the icon that is desired.
The labels for these menu items are found in a source code folder titled 'pos_messages_en_US.properties'.