I am quite novice to Java (re-learning) and I am trying to make a database desktop application. The system will be used for a recording the incoming and outgoing of goods for a wholesaler.
I had done similar kind of application (Student Management System) before as my college project (2 yrs before) without adequate knowledge of OOP.
- first I had a
JFramefor log in, and when logged, the login frame would close showing the other frame. - A frame would act as control panel (similar to dashboard) for navigating.
- The other frame would be provide a specific interface and will close on going back showing the control frame and hiding the closed panel.
Abstract table modelclass was used for fetching the query andJTableor some table was used for displaying the result.To sum up, I simply had lots of frames that would hide and show, and Display table
To be honest, I , at that time, knew nothing more than what was in the book which i didn't bother to scrutinize every line of code, and still haven't seen such an application.
My Question is, how should be a the cascade of JFrames be, everything is managed within a single frame? Also I would be grateful on suggestion of framework (for such kind of application) and any sample project (if any).
-
and why not go web ? ... there is good and easy framework like 'Play' ... just saying'Alois Cochard– Alois Cochard2011年03月17日 07:42:48 +00:00Commented Mar 17, 2011 at 7:42
-
@AloisCochard I don't know in which direction i am going.S L– S L2011年03月17日 07:43:50 +00:00Commented Mar 17, 2011 at 7:43
-
honestly for me deskop java application have no future, web development is not that hard. Take a look at this: playframework.org and make your own opinion :)Alois Cochard– Alois Cochard2011年03月17日 07:53:43 +00:00Commented Mar 17, 2011 at 7:53
-
@AliosCochard sure i will look at it, but currently i have to do this (client is always right), I am doing php right now, and i have interest in java too, sure i will have a look at it. Just wanted to know if I should do same for my client what i've done for collegeS L– S L2011年03月17日 08:06:13 +00:00Commented Mar 17, 2011 at 8:06
-
@expermientX ho yeah, client is always right - I know that too ;) good luck !Alois Cochard– Alois Cochard2011年03月17日 10:21:25 +00:00Commented Mar 17, 2011 at 10:21
1 Answer 1
..how should be a the cascade of JFrames be, everything is managed within a single frame?
There are a number of options:
- Remove the old components and add new ones. Not highly recommended. Error prone and usually unnecessary.
- Use JInternalFrames in a JDesktopPane for multiple views of the same types of data.
- Swap one set of components for another using CardLayout.
- Put each set of components into a JTabbedPane.
- If there are always logically a fixed number of objects (e.g. product tree, product description, stock levels by store table), you might put them in different areas of a BorderLayout, or toss in a JSplitPane to allow resizing of space between GUI elements.
See the Laying Out Components Within a Container lesson of the Java Tutorial for ideas & examples.
3 Comments
Explore related questions
See similar questions with these tags.