I do a photo search application.
in my application, it has 1 textfield and 5 buttons as Asia, EU, Australia, America and Africa
When user enter a keyword (for example, cupcake) in textfield then press one of 5 button (such as button EU)
It should shows a photo relates to the keyword n a name of button, EU.
What I am stuck now is how I can combine the the text and a name of button in my code ?
I am thinking of a string for a name of button.
My code here is:
Error goes up:PHP Code:
if (e.getSource() == btAfrica)
keyWord = txtSearch.getText();
String location = btAfrica.getText("Africa"); // My aim to get name of a button called AFRICA so user search photo with a keyword + AFRICA
originalKeyWord = keyWord + location ;
oldKeyWord = keyWord + location;
Is this way correct or is there another way to do much easier, please provide code example ?PHP Code:
Method getText() in class.ajax.Swing.AbstracButton can not be applied to given types
I appreciate with your helps.