 Sample image
The task is to demonstrate the creation of a series of vertical pinstripes across the entire width of the display.

 in the first quarter the pinstripes should alternate one pixel white, one pixel black = 1 pixel wide vertical pinestripes
 Quarter of the way down the display, we can switch to a wider 2 pixel wide vertical pinstripe pattern, alternating two pixels white, two pixels black. 
 Half way down the display, we switch to 3 pixels wide, 
 for the lower quarter of the display we use 4 pixels.


c.f. Colour_pinstripe/Display

import java.awt._
 
import javax.swing._
 
object PinstripeDisplay extends App {
 
  SwingUtilities.invokeLater(() =>
    new JFrame("Pinstripe") {
 
      class Pinstripe_Display extends JPanel {
 
        override def paintComponent(g: Graphics): Unit = {
          val bands = 4
 
          super.paintComponent(g)
          for (b <- 1 to bands) {
            var colIndex = 0
            for (x <- 0 until getWidth by b) {
              g.setColor(if (colIndex % 2 == 0) Color.white
              else Color.black)
              g.fillRect(x, (b - 1) * (getHeight / bands), x + b, b * (getHeight / bands))
              colIndex += 1
            }
          }
        }
 
        setPreferredSize(new Dimension(900, 600))
      }
 
      add(new Pinstripe_Display, BorderLayout.CENTER)
      pack()
      setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE)
      setLocationRelativeTo(null)
      setVisible(true)
    })
 
}