diff --git a/platform/util/src/com/intellij/ui/components/JBPanel.java b/platform/util/src/com/intellij/ui/components/JBPanel.java index fc6b6fee1860..41d6b80dc22d 100644 --- a/platform/util/src/com/intellij/ui/components/JBPanel.java +++ b/platform/util/src/com/intellij/ui/components/JBPanel.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2016 JetBrains s.r.o. + * Copyright 2000-2017 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -91,6 +91,12 @@ public class JBPanel extends JPanel implements JBComponent return (T)this; } + public T withPreferredSize(int width, int height) { + myPreferredWidth = width; + myPreferredHeight = height; + return (T)this; + } + public T withMaximumWidth(int width) { myMaximumWidth = width; return (T)this;