Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6791981
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T17:54:46+00:00 2026-05-26T17:54:46+00:00

I started with iPhone programming, and I found that iPhone has a clear picture

  • 0

I started with iPhone programming, and I found that iPhone has a clear picture to let developers know what to do, like loadView, viewWillAppear, and so on. Now, I would like to write some Java SE programme, but it is not as easy as I think. I found that Java seems not to have these things (or I don’t know the details). And I found that Java purely uses JFrame to create the GUI, like this:

import javax.swing.*;

   class MyFrame extends JFrame {
      public MyFrame() {
        setTitle("My Empty Frame");
        setSize(300,200); // default size is 0,0
        setLocation(10,200); // default is 0,0 (top left corner)
      }

      public static void main(String[] args) {
        JFrame f = new MyFrame();
        f.show();
      }
    }

Is is the Java way to put everything in the main method? Is there a better architecture?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T17:54:46+00:00Added an answer on May 26, 2026 at 5:54 pm

    iPhone “applications” have a lifecycle because they’re not really “applications” in the traditional sense of the word. They’re more akin to drivers, plugins, or other bits that are meant to be embedded in a larger framework. There’s a lot of scaffolding around them that makes them work, and that scaffolding invokes the various handlers at the right time. That scaffolding isn’t considered part of the application, but it’s an essential part of the running code.

    Java itself is a programming language in which you can certainly write the same sort of “plugin” things — for example, Java applets, Java servlets, Enterprise Java Beans, etc — but you can also write the framework in Java, too! Plenty of such frameworks exist, and then writing an application becomes just a matter of writing one or more “plugins.” But if you sit down and write a main() method and go from there, then you’re eschewing any framework and have complete freedom over how to structure your code.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've started programming for iPhones about a month ago now, and have found the
Well, I've started with iPod/iPhone programming using Head First iPhone Development (O'reilly) and I'm
When I started iPhone development, I read somewhere that it's possible to attach a
I've started a new iPhone app that needs to remember a single, 40-char string.
I have found the Getting Started documents for developing apps on iPhone. I wanted
I just started programming in Xcode and I'm trying to write an iphone application.
I have decided to start programming some apps for the iPhone that eventually will
Sorry for noobish question about iPhone and Quartz programming. Just started my conversion from
I recently started game programming on the iPhone using Cocos2d and Box2d. So here's
I've just started learning D Programming. I'd like to deploy my programs on an

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.