minvio

MinVio FAQ

Answers to the most common questions about using the MinVio library.

If you can’t find what you need here, please open an issue on GitHub: https://github.com/nickd3000/minvio/issues


What is MinVio?

MinVio is a lightweight Java framework for quickly building graphical applications. It creates the window, runs a timed draw loop, and provides simple drawing and input functions so you can focus on ideas instead of boilerplate.

Who is MinVio for?

Anyone who wants to sketch visual ideas in Java with minimal setup: programmatic artists, educators, students, and developers prototyping algorithms or visualizations.

How do I install MinVio?

Add the dependency from Maven Central.

Maven (pom.xml):


<dependency>
    <groupId>io.github.nickd3000</groupId>
    <artifactId>minvio</artifactId>
    <version>1.21</version>
</dependency>

Gradle (Kotlin DSL):

dependencies {
    implementation("io.github.nickd3000:minvio:1.21")
}

Gradle (Groovy DSL):

dependencies {
    implementation 'io.github.nickd3000:minvio:1.21'
}

MinVio requires Java 17 or newer.

What’s the smallest possible program?

import com.physmo.minvio.MinvioApp;

import java.awt.Color;

public class SimpleExample extends MinvioApp {
    public static void main(String... args) {
        new SimpleExample().start(200, 200, "Simple Example", 60);
    }

    @Override
    public void draw(double delta) {
        cls(new Color(207, 198, 179));
        setDrawColor(new Color(17, 52, 69, 215));
        drawFilledRect(50, 50, 40, 40);
        drawText("X:" + getMouseX() + " Y:" + getMouseY(), 10, 190);
    }
}

How does the draw loop work?

What coordinate system does MinVio use?

Can I resize the window?

Yes. As of v1.20, window resizing is supported. Your drawing code should render to the current size each frame. Query the size via your display/context if needed.

Which platforms are supported?

MinVio uses standard Java desktop APIs (AWT/Swing), so it works on Windows, macOS, and Linux where a compatible Java 17+ runtime is available.

How do I draw shapes, text, and images?

Common methods available from MinvioApp include:

See the README and examples for more:

Is there a color palette utility?

Yes. A Palette class with predefined colors is available (v1.20+). You can still use standard java.awt.Color anywhere.

How do I read input?

MinVio provides simple mouse helpers like getMouseX() and getMouseY(). Keyboard and more advanced input options are available through the underlying Java desktop APIs; see the examples and source for patterns.

How do I control performance and smoothness?

What Java version do I need?

Java 17 or newer.

Where can I find API docs?

You can generate Javadoc locally with Maven: mvn javadoc:javadoc (output under target/apidocs). Example projects also showcase API usage.

What license does MinVio use?

See LICENCE.TXT in the repository root for full details.

I added the dependency but Maven/Gradle can’t resolve it.

My program runs but I see a black/blank window.

The window doesn’t appear when I run my program.

How do I include MinVio in a Gradle/Maven multi-module project?

Add the dependency to the module that contains your application code, not just the root project. Ensure that module is configured to produce/run a desktop application.

Where can I report bugs or request features?

Use GitHub issues: https://github.com/nickd3000/minvio/issues. When reporting, include:

Where can I learn more?