# I am looking for a tutor for module development

**URL:** <https://forum.inductiveautomation.com/t/i-am-looking-for-a-tutor-for-module-development/55030>\
**Category:** Module Development\
**Tags:** ignition80\
**Created:** [January 14, 2022, 3:18pm UTC](https://forum.inductiveautomation.com/t/i-am-looking-for-a-tutor-for-module-development/55030 "2022-01-14T15:18:39Z")\
**Posts on this page:** 1\
**Showing post:** 19

<div class="post-metadata">

**Author:** ![bkarabinchak.psi](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bkarabinchak.psi/32/83567_2.png) [@bkarabinchak.psi](https://forum.inductiveautomation.com/u/bkarabinchak.psi)\
**Post date:** [January 18, 2022, 8:29pm UTC](https://forum.inductiveautomation.com/t/i-am-looking-for-a-tutor-for-module-development/55030/19 "2022-01-18T20:29:19Z")

</div>

> [@paul-griffith](#):
>
> You’re creating a container, but not actually adding that container to your primary component.

Whoops. I make this mistake too often in swing.

I did what you said re: putting it all in the constructor. I also had to change it to `extends AbstractVisionPanel` instead of AbstractVisionComponent - the former works but the latter does not.

However, having said that -

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/7/f/7fe7d2d946233c7fc3c95b3258c01f5d68b3e1bd.png)

It's alive! Now for the fun part of programming date logic 😅

On that note though - as these date calculations will take place when a new dropdown selection is made - where would I put my JComboBox ActionListener? The constructor? onStartup?

Here's the current code (onStartup and onShutdown are empty)

```auto
public class DateSelectorComponent extends AbstractVisionPanel {

    private final JPanel container;
    private final JLabel dropdownLabel;
    private final JComboBox<String> dateSelections;
    private final JLabel startDateLabel;
    private final JLabel toLabel;
    private final PMIDateTimePopupSelector startDate;
    private final PMIDateTimePopupSelector endDate;
    private final String[] dateSelectionOptions = {"All", "Today", "This Week", "This Month", "This Year", "Last Week", "Last Month", "Last Year", "Last 3 Months", "Last 6 Months", "Last 12 Months", "Two Week Period", "Post Sept. 2014"};

    public DateSelectorComponent() {
        //Leftover from archetype example. setPreferredsize seems to do stuff, but unsure what else is appropriate to go here over onStartup.
        setFont(new Font("Dialog", Font.PLAIN, 16));
// setPreferredSize(new Dimension(250, 100));
        container = new JPanel(new MigLayout("wrap 4"));
        //Dropdown row
        dropdownLabel = new JLabel("Date:");
        dateSelections = new JComboBox<>(dateSelectionOptions);
        container.add(dropdownLabel, "grow");
        container.add(dateSelections, "span");
        //Datetime row
        startDateLabel = new JLabel("Start Date:");
        startDate = new PMIDateTimePopupSelector();
        toLabel = new JLabel("to");
        endDate = new PMIDateTimePopupSelector();
        container.add(startDateLabel, "grow");
        container.add(startDate, "grow");
        container.add(toLabel, "grow");
        container.add(endDate, "grow");
        //Is this necessary?
        container.setVisible(true);
        this.add(container);
        //not sure if the following is necessary
        this.setVisible(true);
    }

```

Exited this thing's actually coming to fruition now - thanks for all the help.

---

_[View the full topic](https://forum.inductiveautomation.com/t/i-am-looking-for-a-tutor-for-module-development/55030)._
