package com.example.client.utils;
|
|
import javax.swing.*;
|
import java.awt.*;
|
|
public class Compute {
|
/*public static Integer ComputeHeight(Integer topHeight){
|
GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
|
Rectangle rect = ge.getMaximumWindowBounds();
|
Integer screenWidth = rect.width;
|
Integer screenHeight = rect.height;
|
|
Integer panelHeight = screenHeight - 50 - topHeight;
|
|
return panelHeight;
|
}
|
public static Integer ComputeHeightWithScroll(Integer topHeight){
|
GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
|
Rectangle rect = ge.getMaximumWindowBounds();
|
Integer screenWidth = rect.width;
|
Integer screenHeight = rect.height;
|
|
Integer panelHeight = screenHeight - 50 - 30 - topHeight;
|
|
return panelHeight;
|
}*/
|
public static Integer ComputeHeight(Integer topHeight, JFrame frame){
|
int height = frame.getSize().height;
|
Integer panelHeight = height - 70 - topHeight;
|
|
return panelHeight;
|
}
|
public static Integer ComputeHeightWithScroll(Integer topHeight, JFrame frame){
|
int height = frame.getSize().height;
|
Integer panelHeight = height - 100 - topHeight;
|
|
return panelHeight;
|
}
|
}
|