AS
Amilia Storm Bioinformatics & Data Science
GitHub
← Back to projects

Java / Biological Classification

Bee Species
Identifier

A Java Swing application that guides users through visible morphological traits and returns a probable species with its scientific name, family, description and image.

Java Java Swing CardLayout OOP Classification GUI Design Biology

Bee Identifier

Bee Species Identifier application interface

Project profile

Language Java

Framework Swing

Architecture OOP

Species 6

Overview

The Bee Species Identifier is a desktop application that uses visible morphological traits to guide the user through a branching identification key. The user answers questions about insect group, wing-cell count, pollen baskets, hair colour and abdominal markings before receiving a probable species result.

Interface
Java Swing
Navigation
CardLayout
Model
Species classes
Focus
Morphology

Identification workflow

From visible traits to a probable species

01

Select insect group

The user first chooses whether the insect resembles a bee, bumblebee, wasp or fly.

Initial classification
02

Inspect wing cells

The key asks whether the insect has two or three submarginal cells in the wing.

Wing morphology
03

Check pollen basket

The presence or absence of a pollen basket helps separate species groups.

Leg morphology
04

Compare body traits

Hair colour, head colour, body size and abdominal bands are used as additional distinguishing features.

External appearance
05

Display result

The application returns the common name, scientific name, family, description and species image.

Species result

Species model

Species currently represented

HB

Honeybee

Apis mellifera

Family: Apidae

CB

Carder Bee

Bombus pascuorum

Family: Apidae

FB

Furrow Bee

Halictus rubicundus

Family: Halictidae

MB

Red Mason Bee

Osmia bicornis

Family: Megachilidae

YF

Yellow-face Bee

Hylaeus confusus

Family: Colletidae

WV

Common Wasp

Vespula vulgaris

Family: Vespidae

Project video

Demonstration of the classification questions, navigation and final species result.

Application interface

Bee Identifier Java Swing interface

The desktop interface uses Java Swing panels, buttons, images and question screens.

Decision system

Insect group
Wing cells
Pollen basket
Colour and hair
Species result

Each answer directs the user to a new card in the identification sequence.

Application architecture

How the Java project is organised

01

Main application

Creates the JFrame, sets the BeeView as the main content panel and launches the desktop application.

Main.java
02

User interface

Builds question panels, buttons, images, result panels and CardLayout navigation.

BeeView.java
03

Species parent class

Stores the shared fields used by every supported species.

BeeSpecies.java
04

Species subclasses

Each subclass provides its common name, scientific name, family, description and image path.

HoneyBee.java and others

Demo code

Real methods from the application

public abstract class BeeSpecies {

    private final String name;
    private final String scientificName;
    private final String family;

    protected final String description;
    protected final String imagePath;

    public BeeSpecies(
        String name,
        String scientificName,
        String family,
        String description,
        String imagePath
    ) {
        this.name = name;
        this.scientificName =
            scientificName;
        this.family = family;
        this.description =
            description;
        this.imagePath = imagePath;
    }
}
private JPanel createSpeciesResultPanel(
    BeeSpecies species
) {
    JLabel commonNameLabel =
        new JLabel(
            species.getName(),
            SwingConstants.CENTER
        );

    JLabel scientificNameLabel =
        new JLabel(
            species.getScienceName(),
            SwingConstants.CENTER
        );

    JLabel familyLabel =
        new JLabel(
            "Family: " +
            species.getFamily(),
            SwingConstants.CENTER
        );

    JTextArea descriptionArea =
        new JTextArea(
            species.getDescription()
        );

    return panel;
}
public class HoneyBee
    extends BeeSpecies {

    public HoneyBee() {
        super(
            "Honningbie",
            "Apis mellifera",
            "Apidae",
            "A social bee important for
pollination and honey production.",
            "/HonningBie.jpg"
        );
    }
}
public class Main {

    public static final String
        WINDOW_TITLE =
            "Bee Identifier";

    public static void main(
        String[] args
    ) {
        BeeView view =
            new BeeView();

        JFrame frame =
            new JFrame(
                WINDOW_TITLE
            );

        frame.setContentPane(view);
        frame.setSize(900, 650);
        frame.setLocationRelativeTo(
            null
        );

        frame.setVisible(true);
    }
}

Key design decisions

What the project demonstrates

Card-based navigation

CardLayout allows the application to switch between question screens without opening a new window for every decision.

Object-oriented species model

Shared species information is stored in a parent class while individual species inherit and provide their own values.

Event-driven interaction

Action listeners and lambda expressions connect each user answer to the next stage in the identification key.

Biological interpretation

Morphological traits are translated into a structured decision flow that a non-specialist can follow.

!

Limitations and future work

Educational identification tool

The application currently supports a limited set of species and relies on simplified visible traits. It should be presented as an educational identification aid rather than a complete scientific taxonomic key.

Future versions could add more species, clearer illustrations, location filters, confidence scoring and an image-recognition model.