Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Can I use IDE to create GUI?

 
Ruigao Tang
Greenhorn
Posts: 9
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,ranches.

I noticed that "you must not submit any code that is not your own work" in the instuctions.

I designed the gui in a IDE, and it generated code for me. Although I didn't write the code directly, I think it's my "own" work.

I wonder if Sun think like that as me?

Thank you , and forgive my English
 
K. Tsang
Bartender
Pie
Posts: 3223
12
Android Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If I were you I would not use the IDE to generate GUI code. Because those generated methods like "init" or whatever can in fact be put in the constructor directly. Also you would learn more without the IDE help.

Also greyed-out code in the IDE like Netbeans are considered "generated code".
 
Hong Anderson
Ranch Hand
Posts: 1936
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ruigao Tang wrote:Hi,ranches.

I noticed that "you must not submit any code that is not your own work" in the instuctions.

I designed the gui in a IDE, and it generated code for me. Although I didn't write the code directly, I think it's my "own" work.

For me, generated codes that are not only for convenient such as getter/setter or generated methods that implement interface or override methods from superclasses are not your work.

You may check if there are options to control generated codes.
 
Roberto Perillo
Bartender
Posts: 2271
3
Eclipse IDE Java Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Kengkaj Sathianpantarit wrote:For me, generated codes that are not only for convenient such as getter/setter or generated methods that implement interface or override subclasses are not your work.


Agreed.

Ruigao, just to give you a position, here's what I did: at first, I created an interface and generated the code related to the GUI part using a tool called WindowBuilder, and had this code implement my interface. Then, I went to the fun part (server, Data class, etc), and after I finished everything, I created myself the code that would build the same things that were generated by the tool, so I left the GUI part to the end of the project, and since the generated code was already implementing my interface, there was no impact when I replaced the generated code by the code that I created. And for sure, if they see some generated code in your project, you'll be automatically failed. For instance, the SpringLayout was added to Swing specifically to support GUI builders, so if they see it in your code, then it's pretty likely that that code was generated.
 
Ruigao Tang
Greenhorn
Posts: 9
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And for sure, if they see some generated code in your project, you'll be automatically failed.


automatically failed? How terrible words they are!

I want never be automatically failed, because the exam is too expensive for me.

Roberto, your way to develop looks professional, and I think it will be useful for my development in the future.

K. Tsang, your are right, I finished the gui finally without IDE help and had a great sense of accomplishment. I think it's more readable than generated code.

Thank you all the same, Kengkaj.
 
Leandro Coutinho
Ranch Hand
Posts: 423
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Roberto Perillo wrote:
Ruigao, just to give you a position, here's what I did: at first, I created an interface and generated the code related to the GUI part using a tool called WindowBuilder, and had this code implement my interface. Then, I went to the fun part (server, Data class, etc), and after I finished everything, I created myself the code that would build the same things that were generated by the tool, so I left the GUI part to the end of the project, and since the generated code was already implementing my interface, there was no impact when I replaced the generated code by the code that I created. And for sure, if they see some generated code in your project, you'll be automatically failed. For instance, the SpringLayout was added to Swing specifically to support GUI builders, so if they see it in your code, then it's pretty likely that that code was generated.


nice advice!
what layout did you use? I intend to use CardLayout to switch between the JPanels and use GridBagLayout to make the forms.
what do you think?
 
Leandro Coutinho
Ranch Hand
Posts: 423
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
it submitted twice :/
 
Roberto Perillo
Bartender
Posts: 2271
3
Eclipse IDE Java Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Fala ai Leandro!!!

I intend to use CardLayout to switch between the JPanels and use GridBagLayout to make the forms.
what do you think?


I think it'll look great in the end!!!
 
Roel De Nijs
Sheriff
Posts: 9176
77
AngularJS Chrome Eclipse IDE Hibernate Java jQuery MySQL Database Spring Tomcat Server
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Leandro,

I'm wondering why you will need a CardLayout to switch between the JPanels. Which panels are you planning to create?

I'm also using a GridBagLayout for constructing my panels

Regards,
Roel
 
Leandro Coutinho
Ranch Hand
Posts: 423
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Roel De Nijs wrote:Hi Leandro,

I'm wondering why you will need a CardLayout to switch between the JPanels. Which panels are you planning to create?

I'm also using a GridBagLayout for constructing my panels

Regards,
Roel


Hi!

Do your application will have only one jpanel? If not, how do you intend to switch between them?
The way I found is to use CardLayout. Do you know a better way to do this?

Thanks,
Leandro
 
Roberto Perillo
Bartender
Posts: 2271
3
Eclipse IDE Java Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey, Leandro!!!

It's just that switching between panels isn't really necessary
 
Leandro Coutinho
Ranch Hand
Posts: 423
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Roberto Perillo wrote:Hey, Leandro!!!

It's just that switching between panels isn't really necessary


Suppose you have two forms in different JPanels: one for record users and others to record movies.
How do you do to show one JPanel and then other.

I do it using CardLayout.
 
Roel De Nijs
Sheriff
Posts: 9176
77
AngularJS Chrome Eclipse IDE Hibernate Java jQuery MySQL Database Spring Tomcat Server
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My application has:
- a jframe for starting/stopping server and entering the settings
- a dialog for the settings of the client-application
- a jframe that's the main window of the client application (contains search criteria + jtable)
- a dialog containing the room details (which could be used for updating, deleting, booking, unbooking,... a hotel room, but now is just used for booking one)

that's all i have and honestly i don't have any clue where you want to switch panels. the example you gave: there are no users nor movies.
 
Roberto Perillo
Bartender
Posts: 2271
3
Eclipse IDE Java Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Roel De Nijs wrote:the example you gave: there are no users nor movies.


But there could be

Ok, I'm kidding here What my good buddy Roel is saying here is that there isn't such situation, you know... the windows we have to build are supposed to be simpler than that, so there isn't really the need to switch between panels...
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic