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 8367411
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T13:09:03+00:00 2026-06-09T13:09:03+00:00

Since I have many separate classes for my program I created 2 folders (I’m

  • 0

Since I have many separate classes for my program I created 2 folders (I’m using JDeveloper) in my project called “panels” and “buttons” where I’ve placed the corresponding classes that extend JPanel or JButton. I’ve used the same package for all my classes so that those that are placed in a folder can be referenced by the rest of the classes that are not placed in the same folder without importing (all my classes belong to the same package, e.g. mypackage).

My question is should I change this and make the classes of a directory belong to a separate package (e.g. classes in “panels” directory to belong to the mypackage.panels package and classes in “buttons” dir to belong to mypackage.buttons)? The first way works fine and has the benefit of lacking the need to import but I was wondering if this is the “correct” way to do this…

  • 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-06-09T13:09:05+00:00Added an answer on June 9, 2026 at 1:09 pm

    Yes, in general I’d strongly encourage you to make your directory structure match your package structure. Some IDEs will enforce this, and other developers are likely to expect it – it’s useful to know exactly where to find a particular file.

    Now whether you really want separate packages for these controls is a different question, and one we can’t answer.

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

Sidebar

Related Questions

I have several complex classes, that are constructed using separate creator classes that inherits
If there have been commits and many changes since an earlier commit, is there
When using snipmate + vim, is it possible to have many snippet files load
I have many <div> tags separate from each other. They all have this layout:
I have a separate classes for each MySQL table I have in my PHP
How many ServiceContracts can a WCF service have? Specifically, since a ServiceContract is an
Since I have no errors I don't know if this is the right place
I have no code to really display here, since I have not been able
Its been a while since i have coded c++ and i have forgot an
It's been a while since I have used VBA on Excel. I want to

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.