Skip to content

Instantly share code, notes, and snippets.

View mstahv's full-sized avatar

Matti Tahvonen mstahv

View GitHub Profile
@mstahv
mstahv / BarcodeView.java
Created August 30, 2023 05:33
Example how to generate Barcodes in Vaadin apps
package org.example.views;
import com.google.zxing.BarcodeFormat;
import com.google.zxing.client.j2se.MatrixToImageWriter;
import com.google.zxing.common.BitMatrix;
import com.google.zxing.oned.EAN13Writer;
import com.vaadin.flow.component.html.Image;
import com.vaadin.flow.component.orderedlayout.VerticalLayout;
import com.vaadin.flow.router.Route;
import com.vaadin.flow.server.AbstractStreamResource;
package org.peimari.maastokanta.mobile;
import com.vaadin.flow.component.Component;
import com.vaadin.flow.component.html.H3;
import com.vaadin.flow.component.orderedlayout.FlexComponent;
import org.vaadin.firitin.components.orderedlayout.VHorizontalLayout;
import org.vaadin.firitin.components.orderedlayout.VVerticalLayout;
public class NavigationView extends VVerticalLayout {