height

How to set the size of a Flutter Container

As a brief note, on this page I found this example of how to set the size of a Flutter Container:

Container(
    height: MediaQuery.of(context).copyWith().size.height / 3,
);

After looking at what the copyWith method does:

copyWith: Creates a copy of this media query data but with the given fields replaced with the new values.

Altitudes of the Colorado front range mountains alvin November 6, 2018 - 8:16pm

One of my doctors has this photo/image of the altitudes of the mountains that make up the “front range” of Colorado’s Rocky Mountains. I can’t read the signature on the lower-right of the image, but I appreciate whoever put this image together, as I can never remember the names and altitudes of the various mountain peaks.

How to create a “spacer” in JavaFX (with a Region)

As a brief note to self, I just created a “spacer” in JavaFX using a Region, as shown in this code:

// a spacer to push the visible elements up a little
val spacer = new Region
spacer.setPrefHeight(40)
VBox.setVgrow(spacer, Priority.ALWAYS)

I originally created the spacer as a Separator, which is the wrong thing (it’s more like an HTML <hr> tag). A JavaFX Region just gives you a blank space, which you can control as needed.

A Java graphics utilities class

As a quick note, here’s a little Java graphics utilities class I started putting together today. Mostly I’m just concerned with monitor/display sizes at the moment, especially when a computer system has multiple displays.

Java/Scala: How to determine the monitor sizes of multiple displays

Note: This code is currently a work in progress. I know of possible approaches, but I don’t know of a perfect working solution yet.

I’m currently trying to find the right way to find the current monitor size, when you’re writing a Java Swing application to work in a multiple-monitor configuration. I always use three monitors, so I can test this pretty easily.

Sencha Touch textareafield height solutions

Sencha Touch seems to have some problems with its textareafield, especially with sizing and resizing the height in a form. The best solutions I’ve found so far are:

Amazon Kindle eBook cover specifications (height and width size requirements)

I'm in the process of publishing my second eBook for the Amazon Kindle, and one thing that's currently hard to find on the Amazon website is what the eBook cover height and width size specifications are. You can currently only find this information when you get ready to publish your book.

So, as a brief public service, as of May, 2012, here are the Amazon Kindle eBook cover height and width specifications, courtesy of the Amazon KDP book publication website:

How to set the initial size of a Java JFrame

I've been getting back into the Java/Swing world during the last few days, and I thought I'd share some example code here. In my current application, one of the things I just worked on was setting the initial JFrame size to a value I liked.

How to tell a Java JFrame to fill the entire screen

In an earlier tutorial, I shared some code on how to maximize a JFrame, but every once in a while you'll run into a situation where you want to fill an entire screen with a JFrame, but not call a method to actually maximize it. This is rare, but I just ran into this situation, so I thought I'd share the source code here.

Java screen size: How to determine the screen/display size

Java screen size FAQ - "How do I determine the size of the screen (or display) in pixels? (i.e., the screen size, or screen resolution)

The following Java code demonstrates how to get the screen size, using the Java Toolkit class: