calling a service layer method to my presentation layer
Posted
by
Josepth Vodary
on Stack Overflow
See other posts from Stack Overflow
or by Josepth Vodary
Published on 2012-06-21T15:06:08Z
Indexed on
2012/06/21
15:16 UTC
Read the original article
Hit count: 145
java
Ok I feel really dumb asking this but I seem to be missing something really simple here. I have the following code in a class in my service layer -
public Items getItems(String category, float amount, String color,
String type)
The code reads from a database and returns the results - I plan on placing it in a jframe. Nice and simple. But no matter how I call it from the jframe I get errors in eclipse that the code is wrong - either that their are illegal modifiers or such. So obviously I am calling it completely wrong, so my stupid question is how do you call that method into a jframe?
For example - if I try to call it this way:
public Items getItems();
I get told that getItems is an illegal parameter. If I call this.. Items getItems(); I am told its undefined
© Stack Overflow or respective owner